public void coloreCoupPossible() { ArrayList<Coup> coupsPossibles = model.getCoupsPossibles(); for (int i = 0; i < coupsPossibles.size(); i++) { tableauBijouButton[coupsPossibles.get(i).getCoord1().getX()][ coupsPossibles.get(i).getCoord1().getY()] .setBackground(Color.BLACK); } }
public void coloreUnCoupPossible() { if (model.getCoupsPossibles().size() == 0) { partieEstPerdu(" coup possible a jouer"); } Coup coupPossible = model.getUnCoupPossible(); tableauBijouButton[coupPossible.getCoord1().getX()][coupPossible.getCoord1().getY()] .setBackground(Color.BLACK); }