Les clics sur les cases marche, c'est incroyable

main
Allan POINT 3 years ago
parent dd279c0724
commit 6c03d93d86

@ -128,6 +128,10 @@ public class Manager implements ObserverBDJ {
return actualiseurCellule.getArbitre().getPlateau().getColone();
}
public Cellule getCell(int x, int y){
return actualiseurCellule.getArbitre().getPlateau().getCell(x, y);
}
public void setCellsColor(int color){
Cellule.setLivingColor(color);
}

@ -110,8 +110,8 @@ public class PlateauView extends View implements ObserverCV {
}
}
public void addPosCell(int x, int y){
//TODO: Récup la céllue et ajouter dans colors
public void addPosCell(Cellule cellule){
colors.put(cellule.getPosition(), cellule.getActiveColor());
}
public void setColones(int value) throws IllegalArgumentException{

@ -54,7 +54,7 @@ public class FragmentPlateau extends Fragment {
Log.d("D", "y=" + y);
try {
manager.updateOnCellBeforeStart(x, y);
((PlateauView) view1).addPosCell(manager.getCell(x, y));
view1.postInvalidate();
}catch (IllegalArgumentException e){
Log.w("WARNING", e.getMessage());

Loading…
Cancel
Save