anglais/fr mode

master
algolfier 4 years ago
commit 3e34e9a174

4
.gitignore vendored

@ -1,3 +1,7 @@
*.vs *.vs
/SwichGIT/multi/.idea /SwichGIT/multi/.idea
*.idea

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BranchesTreeState">
<expand>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
</path>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
</path>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
</path>
</expand>
<select />
</component>
<component name="ChangeListManager">
<list default="true" id="84a6c709-118a-43ab-819c-2d175d74c8bf" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ComposerSettings">
<execution />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../.." />
</component>
<component name="ProjectId" id="1oWUJCl0mYM5y6OYNDgEnTIUDL7" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="84a6c709-118a-43ab-819c-2d175d74c8bf" name="Default Changelist" comment="" />
<created>1613401765703</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1613401765703</updated>
<workItem from="1613401766817" duration="893000" />
<workItem from="1613495239926" duration="82000" />
<workItem from="1613495323995" duration="681000" />
<workItem from="1613499683985" duration="93000" />
<workItem from="1613499778895" duration="2337000" />
<workItem from="1613502533837" duration="4404000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
<option name="oldMeFiltersMigrated" value="true" />
</component>
</project>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="dataSourceStorageLocal">
<data-source name="mysqlitedb" uuid="c0187b2b-b8fe-4f13-a0ec-505670256d89">
<database-info product="" version="" jdbc-version="" driver-name="" driver-version="" dbms="SQLITE" exact-version="0" />
<auth-provider>no-auth</auth-provider>
<schema-mapping />
</data-source>
</component>
</project>

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="b6d72cad-e941-4c3a-b6c5-e3bcc6cd6173" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ComposerSettings">
<execution />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../.." />
</component>
<component name="ProjectId" id="1oALKuaprZel0d2LL4ieQVOpaAs" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="b6d72cad-e941-4c3a-b6c5-e3bcc6cd6173" name="Default Changelist" comment="" />
<created>1612724389515</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1612724389515</updated>
<workItem from="1612724391269" duration="576000" />
<workItem from="1612725088185" duration="2000" />
<workItem from="1612725454839" duration="44000" />
<workItem from="1612725511845" duration="12000" />
<workItem from="1612725585349" duration="2899000" />
<workItem from="1613499659831" duration="8000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
<option name="oldMeFiltersMigrated" value="true" />
</component>
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="dataSourceStorageLocal">
<data-source name="mysqlitedb" uuid="7c2e260b-335d-4e28-9da1-d4e460683985">
<database-info product="" version="" jdbc-version="" driver-name="" driver-version="" dbms="SQLITE" exact-version="0" />
<auth-provider>no-auth</auth-provider>
<schema-mapping />
</data-source>
<data-source name="mysqlitedb [2]" uuid="6e1bf256-d3ce-4f7e-96a8-fa5410594168">
<database-info product="" version="" jdbc-version="" driver-name="" driver-version="" dbms="SQLITE" exact-version="0" />
<auth-provider>no-auth</auth-provider>
<schema-mapping />
</data-source>
</component>
</project>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="mysqlitedb" uuid="7c2e260b-335d-4e28-9da1-d4e460683985">
<driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:C:\wamp64\www\MorpionBureau\mysqlitedb.db</jdbc-url>
</data-source>
<data-source source="LOCAL" name="mysqlitedb [2]" uuid="6e1bf256-d3ce-4f7e-96a8-fa5410594168">
<driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:C:\Users\alexandre\swish\SwichGIT\multi\mysqlitedb.db</jdbc-url>
</data-source>
</component>
</project>

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" serverName="localg7">
<serverData>
<paths name="localg7">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="MorpionBureau" />
</mappings>
</serverdata>
</paths>
</serverData>
</component>
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/MorpionBureau.iml" filepath="$PROJECT_DIR$/.idea/MorpionBureau.iml" />
</modules>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BranchesTreeState">
<expand>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
</path>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
</path>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
</path>
</expand>
<select />
</component>
<component name="ChangeListManager">
<list default="true" id="b6152df6-6020-4c2b-9d1d-fd527f9fc6df" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ComposerSettings">
<execution />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="CSS File" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../.." />
</component>
<component name="ProjectId" id="1oC02LlFHFMFwdnGk117O96XJbw" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="list.type.of.created.stylesheet" value="CSS" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\wamp64\www\MorpionBureau" />
</key>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="b6152df6-6020-4c2b-9d1d-fd527f9fc6df" name="Default Changelist" comment="" />
<created>1612775060929</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1612775060929</updated>
<workItem from="1612775064087" duration="691000" />
<workItem from="1612777120810" duration="5791000" />
<workItem from="1613057449974" duration="6038000" />
<workItem from="1613070725511" duration="8175000" />
<workItem from="1613249107587" duration="2995000" />
<workItem from="1613303096286" duration="15366000" />
<workItem from="1613394615694" duration="922000" />
<workItem from="1613401752081" duration="5000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
<option name="oldMeFiltersMigrated" value="true" />
</component>
</project>

@ -4,6 +4,7 @@
--lightsedonca: #B7B7B7; --lightsedonca: #B7B7B7;
--lighttercia: #E6E6E6; --lighttercia: #E6E6E6;
/*Couleur bases*/ /*Couleur bases*/
--colorbase : #e9546f;/*ROND*/ --colorbase : #e9546f;/*ROND*/
--colorcarre : #c97fb3;/*CARRE*/ --colorcarre : #c97fb3;/*CARRE*/
--colorone : #00a088;/*TRIANGLE*/ --colorone : #00a088;/*TRIANGLE*/
@ -12,6 +13,16 @@
--colorfour : #E6DA27;/*PENTA*/ --colorfour : #E6DA27;/*PENTA*/
--colorfive : #2E6DB4;/*HEXA*/ --colorfive : #2E6DB4;/*HEXA*/
--colorsix : #E6792F;/*HOCTO*/ --colorsix : #E6792F;/*HOCTO*/
--colorbase : #e75259;
--colorcarre : #30C0DE;
--colorone : #00CBFF;
--colortwo : #00FF6E;
--colorthree : #C800FF;
--colorfour : #E6DA27;
--colorfive : #2E6DB4;
--colorsix : #E6792F;
/*Tailles cartes*/ /*Tailles cartes*/
--tailleTablette : 12vw; --tailleTablette : 12vw;
--taille: 10vw; --taille: 10vw;

@ -308,6 +308,18 @@
width: inherit; width: inherit;
} }
#textjouerr {
font-family: Montserrat, impact, Arial Black;
position: absolute;
font-size: 2.5vw;
margin-top: 0.2vw;
color: var(--lightsedonca);
text-align: center;
width: inherit;
}
#containBottom{ #containBottom{
position: absolute; position: absolute;
bottom: 3vh; bottom: 3vh;
@ -319,6 +331,10 @@
#containScore { #containScore {
display: flex; display: flex;
display: grid;
grid-template-columns: repeat(10, 100px);
grid-template-rows: repeat(1, 100px);
grid-gap: 1vw;
justify-content: center; justify-content: center;
position: relative; position: relative;
left: -50%; left: -50%;
@ -340,6 +356,10 @@
width: 6vw; width: 6vw;
height: 6vw; height: 6vw;
margin: 1vw; margin: 1vw;
width: 7vw;
height: 17vh;
cursor: default; cursor: default;
transition: all 0.3s ease; transition: all 0.3s ease;
} }
@ -353,16 +373,24 @@
} }
.case-score .score-position { .case-score .score-position {
font: 700 2vw/1.3 "Poppins", sans-serif; font: 700 2vw/1.3 "Poppins", sans-serif;
margin: 0 0 0; margin: 0 0 0;
transition: 0.2s ease 150ms; transition: 0.2s ease 150ms;
font-size: 2vw; font-size: 2vw;
font-family:"Poppins", sans-serif; font-family:"Poppins", sans-serif;
font: 700 34px/1.3 "Poppins", sans-serif;
margin: 0 0 0;
transition: 0.2s ease 150ms;
} }
.case-score .score-pseudo, .score-points { .case-score .score-pseudo, .score-points {
font: 500 12px "Poppins", sans-serif; font: 500 12px "Poppins", sans-serif;
margin-top: -0.2em; margin-top: -0.2em;
font-size: 0.8vw; font-size: 0.8vw;
} }
.case-score:after { .case-score:after {

@ -163,6 +163,16 @@
color: var(--lightsedonca); color: var(--lightsedonca);
} }
#textjouerr {
font-family: Montserrat, impact, Arial Black;
position: absolute;
font-size: 10vw;
margin-top: 0.2vw;
width: inherit;
text-align: center;
color: var(--lightsedonca);
}
#choosemode { #choosemode {
height: 7vw; height: 7vw;
width: 50vw; width: 50vw;

@ -53,8 +53,10 @@
</div> </div>
<div id="cf2" class="shadow"> <div id="cf2" class="shadow">
<img onclick="functionLange()" id="flag_bottom" src="imgs/flags/flag-uk.png" /> <a onclick="functionLange()">
<img onclick="functionLange()" id="flag_top" src="imgs/flags/flag-france.png" /> <img src="imgs/flags/flag-france.png" id="flag_top">
</a>
</div> </div>
</div> </div>
@ -71,9 +73,9 @@
<div id="popup1" class="overlay"> <div id="popup1" class="overlay">
<div class="popup"> <div class="popup">
<h2>Les Règles :</h2> <h2 id="lesRegles">Les Règles :</h2>
<a class="close" href="#">&times;</a> <a class="close" href="#">&times;</a>
<div class="content"> <div class="content" id="textRules">
Swish : Jeu de 60 cartes compos&eacute chacun de billes et de cerceaux, de 4 couleurs Swish : Jeu de 60 cartes compos&eacute chacun de billes et de cerceaux, de 4 couleurs
diff&eacuterentes possibles. 16 cartes sont pos&eacutes sur une table et le joueur doit faire superposer diff&eacuterentes possibles. 16 cartes sont pos&eacutes sur une table et le joueur doit faire superposer
des cartes de mani&egravere que chaque bille soit dans le cerceau de m&ecircme couleur dune autre des cartes de mani&egravere que chaque bille soit dans le cerceau de m&ecircme couleur dune autre
@ -571,7 +573,11 @@
<a onclick="lancerpartie();"> <a onclick="lancerpartie();">
<div id="contourbuttonvalider"> <div id="contourbuttonvalider">
<div class="bouttonvalider violet"> <div class="bouttonvalider violet">
<h1 id="textjouer">JOUER</h1> <h1 id="textjouer">JOUER</h1>
<h1 id="textjouerr">JOUER</h1>
</div> </div>
</div> </div>
</a> </a>
@ -595,6 +601,34 @@
<div id="modesuiv"> <div id="modesuiv">
<div id="trianglesuiv"> <div id="trianglesuiv">
</div>
</div>
</a>
</div>
</div>
<div id="choosedimension">
<div id="conteneurmode">
<a onclick="dimensionPrec()">
<div id="modeprec">
<div id="triangleprec">
</div>
</div>
</a>
<div id="textdumode">
<h1 id="textdimension">4 * 3</h1>
</div>
<a onclick="dimensionSuiv()">
<div id="modesuiv">
<div id="trianglesuiv">
</div> </div>
</div> </div>
</a> </a>
@ -635,26 +669,42 @@
<div id="containBottom"> <div id="containBottom">
<!-- tableau des scores --> <!-- tableau des scores -->
<h1 class="titreScore">Classement - solo</h1> <h1 class="titreScore">Classement - solo</h1>
<h1 class="titreScore" id="classementtxt">Classement - solo</h1>
<div id="containScore"> <div id="containScore">
<div class="case-score first" data-description="Score obtenu le ..."> <div class="case-score first" data-description="Score obtenu le ...">
<div class="score-description"> <div class="score-description">
<div class="score-position">1er</div> <div class="score-position">1er</div>
<div class="score-position" id="premier">1er</div>
<div class="score-pseudo">palafour</div> <div class="score-pseudo">palafour</div>
<div class="score-points">696 pts</div> <div class="score-points">696 pts</div>
</div> </div>
</div> </div>
<div class="case-score second" data-description="Score obtenu le ..."> <div class="case-score second" data-description="Score obtenu le ...">
<div class="score-description"> <div class="score-description">
<div class="score-position">2e</div> <div class="score-position">2e</div>
<div class="score-position" id="deuxieme">2e</div>
<div class="score-pseudo">cyril</div> <div class="score-pseudo">cyril</div>
<div class="score-points">600 pts</div> <div class="score-points">600 pts</div>
</div> </div>
</div> </div>
<div class="case-score third" data-description="Score obtenu le ..."> <div class="case-score third" data-description="Score obtenu le ...">
<div class="score-description"> <div class="score-description">
<div class="score-position">3e</div> <div class="score-position">3e</div>
<div class="score-position" id="troisieme">3e</div>
<div class="score-pseudo">mamore</div> <div class="score-pseudo">mamore</div>
<div class="score-points">500 pts</div> <div class="score-points">500 pts</div>
</div> </div>

@ -15,6 +15,14 @@ var allMode = ["Match à Point", "Mode Timer", "Infini", "Bac"]; // Défini tout
var allDimension = ["4 * 3", "3 * 3", "3 * 2", "2 * 2"];// Défini toutes les dimensions que les cartes peuvent avoir var allDimension = ["4 * 3", "3 * 3", "3 * 2", "2 * 2"];// Défini toutes les dimensions que les cartes peuvent avoir
var selectionMode = 0; var selectionMode = 0;
var selectionDiemension = 0; var selectionDiemension = 0;
var allModeFrench = ["Match à Point", "Mode Timer", "Infini", "Bac"]; // Défini tout les modes de Jeu en français
var allModeEngl = ["Point Match", "Timer mode", "Infini", "Bac"]; // Défini tout les modes de Jeu en Anglais
var allDimension = ["4 * 3", "3 * 3", "3 * 2", "2 * 2"];// Défini toutes les dimensions que les cartes peuvent avoir
var selectionMode = 0;
var selectionDiemension = 0;
var modelangue = false;
var lesPoints = 0; //Points du Joueur1 var lesPoints = 0; //Points du Joueur1
@ -49,8 +57,56 @@ function dimensionPrec() {
selectionDiemension -= 1; selectionDiemension -= 1;
} }
document.getElementById("textdimension").textContent = "" + allDimension[selectionDiemension] document.getElementById("textdimension").textContent = "" + allDimension[selectionDiemension]
if(!modelangue){
if (selectionMode == 0) {
selectionMode = allModeFrench.length - 1;
} else {
selectionMode -= 1;
}
document.getElementById("textmode").textContent = "" + allModeFrench[selectionMode]
}
else{
if (selectionMode == 0) {
selectionMode = allModeEngl.length - 1;
} else {
selectionMode -= 1;
}
document.getElementById("textmode").textContent = "" + allModeEngl[selectionMode]
}
} }
function modeSuiv() {
if(!modelangue){
if (selectionMode == allModeFrench.length - 1) {
selectionMode = 0;
} else {
selectionMode += 1;
}
document.getElementById("textmode").textContent = "" + allModeFrench[selectionMode]
}
else{
if (selectionMode == allModeEngl.length - 1) {
selectionMode = 0;
} else {
selectionMode += 1;
}
document.getElementById("textmode").textContent = "" + allModeEngl[selectionMode]
}
}
function dimensionPrec() {
if (selectionDiemension == 0) {
selectionDiemension = allDimension.length - 1;
} else {
selectionDiemension -= 1;
}
document.getElementById("textdimension").textContent = "" + allDimension[selectionDiemension]
}
function dimensionSuiv() { function dimensionSuiv() {
if (selectionDiemension == allDimension.length - 1) { if (selectionDiemension == allDimension.length - 1) {
selectionDiemension = 0; selectionDiemension = 0;
@ -430,7 +486,17 @@ function lancerpartie() {
creePartieClassique3_2(); creePartieClassique3_2();
majSizeCard(2); majSizeCard(2);
} else if (selectionDiemension == 3) { } else if (selectionDiemension == 3) {
window.alert("Oups, il semblerait que ce mode ne soit pas encore disponible..."); window.alert("Oups, il semblerait que ce mode ne soit pas encore disponible...");
if(!modelangue){
window.alert("Oups, il semblerait que ce mode ne soit pas encore disponible...");
}
else{
window.alert("Oops, it seems that this mode is not yet available...");
}
ready = false; ready = false;
} }
@ -1238,7 +1304,13 @@ function chercherCombinaison() {
for (var h = 0; h < DeckTeste.length; h++) { for (var h = 0; h < DeckTeste.length; h++) {
recup.push(deckPartie.indexOf(DeckTeste[h]) + 1); recup.push(deckPartie.indexOf(DeckTeste[h]) + 1);
} }
window.alert("Combinaison a " + (N + 2) + " cartes trouvée : " + recup); if(!modelangue){
window.alert("Combinaison a " + (N + 2) + " cartes trouvée : " + recup);
}
else{
window.alert("Combination with " + (N + 2) + " cards found : " + recup);
}
} }
} }
} }
@ -1281,7 +1353,17 @@ function printCombinations(array, p) {
} }
} }
run(0, 0); run(0, 0);
window.alert("fin test " + k + " cartes") window.alert("fin test " + k + " cartes")
if(!modelangue){
window.alert("fin test " + k + " cartes")
}
else{
window.alert("end test " + k + " cards")
}
} }
window.alert("nb combi :" + Cptsolution); window.alert("nb combi :" + Cptsolution);
} }
@ -1307,7 +1389,13 @@ function testCombinaison(DeckTeste, combi, Cptsolution) {
//Reagarde si il y a une solution //Reagarde si il y a une solution
if (!solution) { if (!solution) {
Cptsolution++; Cptsolution++;
window.alert("Combinaison à " + (DeckTeste.length) + " cartes trouvée : " + combi); if(!modelangue){
window.alert("Combinaison à " + (DeckTeste.length) + " cartes trouvée : " + combi);
}
else{
window.alert("Combination with " + (DeckTeste.length) + " cards found : " + combi);
}
} }
return Cptsolution; return Cptsolution;
} }
@ -1352,11 +1440,23 @@ function chercheCombi2() {
} }
if (!solution) { if (!solution) {
Cptsolution++; Cptsolution++;
window.alert("Combinaison a 2 trouve: " + (i + 1) + " " + (i + j + 2)); if(!modelangue){
window.alert("Combinaison a 2 trouve: " + (i + 1) + " " + (i + j + 2));
}
else{
window.alert("Combination with 2 found: " + (i + 1) + " " + (i + j + 2));
}
} }
} }
} }
window.alert("Nombre de solution a 2 cartes : " + Cptsolution); if(!modelangue){
window.alert("Nombre de solution a 2 cartes : " + Cptsolution);
}
else{
window.alert("Number of solutions with 2 cards : " + Cptsolution);
}
} }
//================================================================================= //=================================================================================
@ -1440,15 +1540,33 @@ function chercheCombi3() {
} }
if (!solution) { if (!solution) {
Cptsolution++; Cptsolution++;
window.alert("Combinaison a 3 trouve: " + (i + 1) + " " + (i + j + 2) + " " + (k + j + i + 3)); if(!modelangue){
window.alert("Combinaison a 3 trouve: " + (i + 1) + " " + (i + j + 2) + " " + (k + j + i + 3));
}
else{
window.alert("Combination with 3 found: " + (i + 1) + " " + (i + j + 2) + " " + (k + j + i + 3));
}
} }
} }
} }
} }
if (Cptsolution == 0) { if (Cptsolution == 0) {
window.alert("Pas de solution"); if(!modelangue){
window.alert("Pas de solution");
}
else{
window.alert("No solution");
}
} }
window.alert("Nombre de solution a 3 cartes : " + Cptsolution); if(!modelangue){
window.alert("Nombre de solution a 3 cartes : " + Cptsolution);
}
else{
window.alert("Number of solutions with 3 cards : " + Cptsolution);
}
} }
@ -1476,7 +1594,13 @@ function decompte() {
} }
if (cpt == 0) { if (cpt == 0) {
window.alert("fin du jeu"); if(!modelangue){
window.alert("fin du jeu");
}
else{
window.alert("Game Over");
}
retour(); retour();
window.location.reload(); window.location.reload();
clearInterval(itv); clearInterval(itv);
@ -1507,10 +1631,22 @@ function testerLesCartes() {
function testPourJeuInfini() { function testPourJeuInfini() {
try { try {
if (carteselect.length == 0) { if (carteselect.length == 0) {
window.alert("Selection Vide"); if(!modelangue){
window.alert("Selection Vide");
}
else{
window.alert("Empty selection");
}
return; return;
} else if (carteselect.length < 2) { } else if (carteselect.length < 2) {
window.alert("Selection Trop Petite"); if(!modelangue){
window.alert("Selection Trop Petite");
}
else{
window.alert("Selection Too Small");
}
return; return;
} else { } else {
var copie = []; var copie = [];
@ -1539,10 +1675,28 @@ function testPourJeuInfini() {
} }
} }
if (solution) { if (solution) {
document.getElementById("affSolution").textContent = 'Aucune solution trouvée...'; document.getElementById("affSolution").textContent = 'Aucune solution trouvée...';
} }
if (!solution) { if (!solution) {
document.getElementById("affSolution").textContent = 'Assemblage de ' + copie.length + ' cartes trouvé !'; document.getElementById("affSolution").textContent = 'Assemblage de ' + copie.length + ' cartes trouvé !';
if(!modelangue){
document.getElementById("affSolution").textContent = 'Aucune solution trouvée...';
}
else{
document.getElementById("affSolution").textContent = 'No solutions found...';
}
}
if (!solution) {
if(!modelangue){
document.getElementById("affSolution").textContent = 'Assemblage de ' + copie.length + ' cartes trouvé !';
}
else{
document.getElementById("affSolution").textContent = 'Assembly of ' + copie.length + ' cards found !';
}
} }
} }
} catch (e) { } catch (e) {
@ -1555,10 +1709,22 @@ function testPourJeuInfini() {
function testPourJeuClassique() { function testPourJeuClassique() {
//try { //try {
if (carteselect.length == 0) { if (carteselect.length == 0) {
window.alert("Selection Vide test pour jeu classique"); if(!modelangue){
window.alert("Selection Vide test pour jeu classique");
}
else{
window.alert("Selection Empty test for classic game");
}
return; return;
} else if (carteselect.length < 2) { } else if (carteselect.length < 2) {
window.alert("Selection Trop Petite"); if(!modelangue){
window.alert("Selection Trop Petite");
}
else{
window.alert("Selection Too Small");
}
return; return;
} else { } else {
var copie = []; var copie = [];
@ -1582,10 +1748,24 @@ function testPourJeuClassique() {
} }
} }
if (solution) { if (solution) {
document.getElementById("affSolution").textContent = 'Aucune solution trouvée...'; document.getElementById("affSolution").textContent = 'Aucune solution trouvée...';
if(!modelangue){
document.getElementById("affSolution").textContent = 'Aucune solution trouvée...';
}
else{
document.getElementById("affSolution").textContent = 'No solutions found...';
}
} }
if (!solution) { if (!solution) {
document.getElementById("affSolution").textContent = 'Assemblage de ' + copie.length + ' cartes trouvé ! Il reste encore ' + TasDuJEU.length + ' cartes !'; if(!modelangue){
document.getElementById("affSolution").textContent = 'Assemblage de ' + copie.length + ' cartes trouvé ! Il reste encore ' + TasDuJEU.length + ' cartes !';
}
else{
document.getElementById("affSolution").textContent = 'Assembly of ' + copie.length + ' cards found ! There are still ' + TasDuJEU.length + ' cards !';
}
} }
} }
/*} catch (e) { /*} catch (e) {
@ -1627,11 +1807,23 @@ function copieLiseDeFigure(Liste) {
} }
function copieFigure(uneFigure) { function copieFigure(uneFigure) {
window.alert("Avant copiage " + uneFigure.CodeHTML) if(!modelangue){
window.alert("Avant copiage " + uneFigure.CodeHTML)
}
else{
window.alert("Before copying " + uneFigure.CodeHTML)
}
if (uneFigure == null) { if (uneFigure == null) {
return null; return null;
} }
window.alert("je fais la copie") if(!modelangue){
window.alert("je fais la copie");
}
else{
window.alert("I make the copy");
}
var copie = new Figure(uneFigure.type, uneFigure.forme, uneFigure.X, uneFigure.Y); var copie = new Figure(uneFigure.type, uneFigure.forme, uneFigure.X, uneFigure.Y);
return copie; return copie;
} }
@ -1823,16 +2015,56 @@ function bacASable() {
afficherCartes(lesCartes); afficherCartes(lesCartes);
} }
function functionLange(){ function functionLange(){
if(lange % 2 == 0) //window.alert(modelangue);
{
document.getElementById("flag_top").classList.add("transparent"); if(modelangue){
} else{ modelangue = false;
document.getElementById("flag_top").classList.remove("transparent"); //MODE FRANCAIS =======
document.getElementById('flag_top').src = "imgs/flags/flag-france.png";
document.getElementById('textjouerr').innerHTML = 'JOUER';
//Traduction classement
document.getElementById('classementtxt').textContent = 'Classement - solo';
document.getElementById('premier').textContent = '1er';
document.getElementById('deuxieme').textContent = '2e';
document.getElementById('troisieme').textContent = '3e';
//Traduction paramètres
document.getElementById('SettingName').textContent = 'Paramètres';
//Tradcution des règles
document.getElementById('lesRegles').textContent = 'Les Règles';
document.getElementById('textRules').textContent = 'Swish : Jeu de 60 cartes compos&eacute chacun de billes et de cerceaux, de 4 couleurs diff&eacuterentes possibles. 16 cartes sont pos&eacutes sur une table et le joueur doit faire superposer des cartes de mani&egravere que chaque bille soit dans le cerceau de m&ecircme couleur dune autre carte.';
} }
lange = lange + 1;
}
else{
modelangue = true;
//MODE ANGLAIS ========
document.getElementById('flag_top').src = "imgs/flags/flag-uk.png";
document.getElementById('textjouerr').innerHTML = 'PLAY';
//Traduction classement
document.getElementById('classementtxt').textContent = 'Ranking - solo';
document.getElementById('premier').textContent = '1st';
document.getElementById('deuxieme').textContent = '2nd';
document.getElementById('troisieme').textContent = '3rd';
//Traduction paramètres
document.getElementById('SettingName').textContent = 'Settings';
//Traduction des règles
document.getElementById('lesRegles').textContent = 'The Rules';
document.getElementById('textRules').textContent = 'Swish : Set of 60 cards each composed of balls and hoops, 4 different colors possible. 16 cards are placed on a table and the player has to lay cards on top of each other in such a way that each ball is in the same color hoop as another card.'
}
}

Loading…
Cancel
Save