Skip to content
Snippets Groups Projects
Commit 78309d00 authored by AMOCA OKKES's avatar AMOCA OKKES
Browse files

Debug

parents 75d2e53a cc9130c8
No related merge requests found
......@@ -4,7 +4,20 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="0242c1a9-e139-4946-98de-d110221679b6" name="Default Changelist" comment="" />
<list default="true" id="0242c1a9-e139-4946-98de-d110221679b6" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/codeStyles/Project.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/codeStyles/Project.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/kotlinc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/kotlinc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/libraries/KotlinJavaRuntime.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/KotlinJavaRuntime.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/puissance4_java.iml" beforeDir="false" afterPath="$PROJECT_DIR$/puissance4_java.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/dcc.mdj" beforeDir="false" afterPath="$PROJECT_DIR$/src/dcc.mdj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/puissance4/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/puissance4/Main.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/puissance4/model/Grille.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/puissance4/model/Grille.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
......@@ -33,13 +46,13 @@
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="last_opened_file_path" value="$USER_HOME$/IdeaProjects/P31_systeme_fichier" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" />
<property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
</component>
<component name="RunManager">
<component name="RunManager" selected="Application.Main">
<configuration name="FullRowDetection" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="puissance4.controleur.FullRowDetection" />
<module name="puissance4_java" />
......@@ -53,8 +66,35 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="puissance4.Main" />
<module name="puissance4_java" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="puissance4.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration default="true" type="ArquillianTestNG" factoryName="" nameIsGenerated="true">
<option name="arquillianRunConfiguration">
<value>
<option name="containerStateName" value="" />
</value>
</option>
<option name="TEST_OBJECT" value="CLASS" />
<properties />
<listeners />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<recent_temporary>
<list>
<item itemvalue="Application.Main" />
<item itemvalue="Application.FullRowDetection" />
</list>
</recent_temporary>
......@@ -79,9 +119,7 @@
<workItem from="1607010556720" duration="2636000" />
<workItem from="1607245589897" duration="24000" />
<workItem from="1607412315237" duration="91000" />
<workItem from="1607414232494" duration="651000" />
<workItem from="1607414915432" duration="1277000" />
<workItem from="1607416619648" duration="2006000" />
<workItem from="1607415898623" duration="2049000" />
</task>
<servers />
</component>
......
No preview for this file type
No preview for this file type
package puissance4;
import puissance4.model.Grille;
import java.awt.*;
public class Main
{
public static void main(String[] args)
{
System.out.println("Hello World");
Grille grid = new Grille();
grid.displayGrille();
}
}
......@@ -113,8 +113,8 @@ public class FullRowDetection {
board[j][i] = tab[height-i-1][j] ;
System.out.println( Arrays.toString(
new FullRowDetection().detect( board )
System.out.println( Arrays.toString(
new FullRowDetection().detect( board )
) );
}
......
package puissance4.model;
import java.util.ArrayList;
import
public class Case {
private int posLigne;
private int posColonne;
public Case(int posL, int posC) {
this.posLigne=posL;
this.posColonne=posC;
}
public boolean[][] getEnplacement(int posL, int posC){
return grille[posL][posC];
}
public Case() {
public void setEnplacement(int posL, int posC){
this.posLigne=posL;
this.posColonne=posC;
}
public void Remplir(int posL, int posC){
for (int i = 0;i < grille.length; i++) {
for (int j = 0; j < grille[i].length; j++) {
grille[posL][posC] = true;
}
}
private void Remplir(int posL, int posC){
}
}
package puissance4.model;
import java.util.Arrays;
public class Grille
{
private final int nbCases;
private int nblignes;
private int nbColonnes;
public boolean[][] grille;
public Grille ()
{
this.nbCases = 42;
this.nblignes = 6;
this.nbColonnes = 7;
grille = new boolean[nblignes][nbColonnes];
private final int nbCases = 42;
private final int nblignes = 6;
private final int nbColonnes = 7;
private boolean[][] grid;
public Grille() {
grid = new boolean[nblignes][nbColonnes];
}
public int getNblignes() {
return nblignes;
return this.nblignes;
}
public int getNbColonnes() {
return nbColonnes;
return this.nbColonnes;
}
public void setNblignes(int nb) {
this.nblignes = nb;
public int getNbCases(){
return this.nbCases;
}
public void setNbColonnes(int nb) {
this.nbColonnes = nb;
public boolean[][] getGrille(){
return this.grid;
}
public boolean estVide() {
return Arrays.toString(grille).isEmpty();
}
public void displayGrille(){
String res = "";
public boolean estPleine() {
boolean res = false;
for (int i = 0; i < grille.length; i++) {
if (i == grille.length - 1) {
res = true;
for (int i = 0; i < this.nblignes; i++) {
for (int j = 0; j < this.nbColonnes; j++) {
System.out.print(this.grid[i][j] + " ");
}
System.out.println();
}
return res;
System.out.println();
}
}
......@@ -2,13 +2,13 @@ package puissance4.model;
import java.awt.*;
public class Pion{
public class Pion {
private Color couleur;
private Case emplacement;
public Pion(Color couleur) {
this.couleur=couleur;
public Pion(){
}
public Color getCouleur() {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment