$
This commit is contained in:
parent
34b7569007
commit
a7ccc42e5c
Binary file not shown.
1
src/.idea/.name
Normal file
1
src/.idea/.name
Normal file
@ -0,0 +1 @@
|
||||
tamere
|
6
src/.idea/vcs.xml
Normal file
6
src/.idea/vcs.xml
Normal file
@ -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>
|
@ -9,7 +9,13 @@
|
||||
<option name="autoReloadType" value="NONE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="82f4db7b-b08f-41cd-bd6f-7811a6f46e99" name="Changes" comment="" />
|
||||
<list default="true" id="82f4db7b-b08f-41cd-bd6f-7811a6f46e99" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.gradle/7.5/fileHashes/fileHashes.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.5/fileHashes/fileHashes.lock" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/example/tamere/Events/SelectionColorEvent.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/example/tamere/Events/SelectionColorEvent.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/example/tamere/Events/TrayColorEvent.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/example/tamere/Events/TrayColorEvent.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/com/example/tamere/Game/Checker.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/example/tamere/Game/Checker.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
@ -29,25 +35,33 @@
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
|
||||
</component>
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="ProblemsViewState">
|
||||
<option name="selectedTabId" value="CurrentFile" />
|
||||
</component>
|
||||
<component name="ProjectId" id="2NNheOXMZhE2kgipuXX4kyPDGdI" />
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"cidr.known.project.marker": "true",
|
||||
"project.structure.last.edited": "Modules",
|
||||
"project.structure.proportion": "0.17",
|
||||
"project.structure.side.proportion": "0.2"
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"cidr.known.project.marker": "true",
|
||||
"project.structure.last.edited": "Modules",
|
||||
"project.structure.proportion": "0.17",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"settings.editor.selected.configurable": "terminal"
|
||||
}
|
||||
}</component>
|
||||
}]]></component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\probo\Desktop\tamere\app\src\main\java\com\example\tamere" />
|
||||
|
@ -15,23 +15,28 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class SelectionColorEvent
|
||||
extends View
|
||||
implements View.OnClickListener {
|
||||
public class SelectionColorEvent extends View implements View.OnClickListener {
|
||||
private JMController controller;
|
||||
|
||||
private Map<String, Object> containers;
|
||||
|
||||
/**
|
||||
* [0] = x
|
||||
* [1] = y
|
||||
* */
|
||||
int[] coords;
|
||||
|
||||
private Map<String, Object> containers;
|
||||
|
||||
private int[] coords;
|
||||
private DeckWinner winner;
|
||||
private List<Circle> lamdbaDeck;
|
||||
private Context context;
|
||||
|
||||
/**
|
||||
* Evenement liee a la selection de couleur
|
||||
*
|
||||
* @param controller Le controller.
|
||||
* @param context Le contexte.
|
||||
* @param containers Liste des references vers les differents layouts.
|
||||
* @param winner La combinaison gagnante.
|
||||
* */
|
||||
public SelectionColorEvent(JMController controller, Context context, Map<String, Object> containers, DeckWinner winner) {
|
||||
super(context);
|
||||
|
||||
@ -43,11 +48,19 @@ public class SelectionColorEvent
|
||||
this.winner = winner;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change de ligne une fois qu'une ligne est complete par 4 cercles.
|
||||
* Change le this.coords[..., y]
|
||||
* */
|
||||
public void changeSection() {
|
||||
this.coords[0]++;
|
||||
this.coords[1] = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change de ligne une fois qu'une ligne est complete par 4 cercles.
|
||||
* Change le this.coords[x, ...]
|
||||
* */
|
||||
public void changeCase() {
|
||||
this.coords[1]++;
|
||||
}
|
||||
|
@ -9,10 +9,16 @@ public class TrayColorEvent implements View.OnClickListener {
|
||||
JMController controller;
|
||||
int curCase;
|
||||
|
||||
/**
|
||||
* Events lie au plateau de jeu
|
||||
*
|
||||
* @param controller le controller
|
||||
* */
|
||||
public TrayColorEvent(JMController controller) {
|
||||
this.curCase = 0;
|
||||
this.controller = controller;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Circle circle = view.findViewById(view.getId());
|
||||
|
@ -23,6 +23,12 @@ public class Checker {
|
||||
this.winner = winner;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comparer la combinaison du joueur avec la combinaison gagnante.
|
||||
*
|
||||
* @param context Le contexte pour les Circles
|
||||
* @return La liste compose des pions verificateurs
|
||||
* */
|
||||
public List<Circle> check(Context context) {
|
||||
List<Circle> winnerDeck = this.winner.getCombinaison();
|
||||
List<Circle> lambdaDeck = this.lamdba.getCombinaison();
|
||||
|
Loading…
Reference in New Issue
Block a user