From a7ccc42e5cad39bfa8e26c66a0e5b3a2df6242df Mon Sep 17 00:00:00 2001 From: "pro.boooooo" Date: Thu, 23 Mar 2023 23:34:13 +0100 Subject: [PATCH] $ --- src/.gradle/7.5/fileHashes/fileHashes.lock | Bin 17 -> 17 bytes src/.idea/.name | 1 + src/.idea/vcs.xml | 6 +++ src/.idea/workspace.xml | 36 ++++++++++++------ .../tamere/Events/SelectionColorEvent.java | 27 +++++++++---- .../example/tamere/Events/TrayColorEvent.java | 6 +++ .../java/com/example/tamere/Game/Checker.java | 6 +++ 7 files changed, 64 insertions(+), 18 deletions(-) create mode 100644 src/.idea/.name create mode 100644 src/.idea/vcs.xml diff --git a/src/.gradle/7.5/fileHashes/fileHashes.lock b/src/.gradle/7.5/fileHashes/fileHashes.lock index 521d1cc796a5967ca5614fbe9fcc05edd631b17d..cb03c9723cf83f7ef497bf8a3797333191d113b8 100644 GIT binary patch literal 17 VcmZSf?0Ef{SGw^%0~oMp0su7H1gii5 literal 17 VcmZSf?0Ef{SGw^%0~oNU0{}GG1gQW3 diff --git a/src/.idea/.name b/src/.idea/.name new file mode 100644 index 0000000..73538db --- /dev/null +++ b/src/.idea/.name @@ -0,0 +1 @@ +tamere \ No newline at end of file diff --git a/src/.idea/vcs.xml b/src/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/src/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/.idea/workspace.xml b/src/.idea/workspace.xml index 98d0fca..c855258 100644 --- a/src/.idea/workspace.xml +++ b/src/.idea/workspace.xml @@ -9,7 +9,13 @@ + + + + + - { - "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" + +}]]> diff --git a/src/app/src/main/java/com/example/tamere/Events/SelectionColorEvent.java b/src/app/src/main/java/com/example/tamere/Events/SelectionColorEvent.java index 588287b..37b743d 100644 --- a/src/app/src/main/java/com/example/tamere/Events/SelectionColorEvent.java +++ b/src/app/src/main/java/com/example/tamere/Events/SelectionColorEvent.java @@ -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 containers; + /** * [0] = x * [1] = y * */ - int[] coords; - - private Map containers; - + private int[] coords; private DeckWinner winner; private List 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 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]++; } diff --git a/src/app/src/main/java/com/example/tamere/Events/TrayColorEvent.java b/src/app/src/main/java/com/example/tamere/Events/TrayColorEvent.java index dedbfde..f651f6e 100644 --- a/src/app/src/main/java/com/example/tamere/Events/TrayColorEvent.java +++ b/src/app/src/main/java/com/example/tamere/Events/TrayColorEvent.java @@ -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()); diff --git a/src/app/src/main/java/com/example/tamere/Game/Checker.java b/src/app/src/main/java/com/example/tamere/Game/Checker.java index e07e4d1..8df9a43 100644 --- a/src/app/src/main/java/com/example/tamere/Game/Checker.java +++ b/src/app/src/main/java/com/example/tamere/Game/Checker.java @@ -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 check(Context context) { List winnerDeck = this.winner.getCombinaison(); List lambdaDeck = this.lamdba.getCombinaison();