Commit dfbb28b4 authored by jwars62's avatar jwars62
Browse files

com

parent f2832ca0
......@@ -58,7 +58,7 @@ public class ButtonGrilleHautControleur implements ActionListener{
System.out.println("\1:"+s+"\n2:"+n[0]);
if(n[0].equals(s)){
System.out.println("ok:"+n[1]);
log.tir_recu(n[1], recup);
log.tir_recu(n[1]);
}
}
}
......
......@@ -1140,8 +1140,12 @@ public class FenLog extends JFrame{
* @param cible le bouton ciblé
* @throws BadCoordException
*/
public void tir_recu(String pos, JButton cible) throws BadCoordException{
IShip ship = this.flotte.findShip(new Coord(pos));
public void tir_recu(String pos) throws BadCoordException{
Coord c = new Coord(pos);
IShip ship = this.flotte.findShip(c);
int x =c.getX();
int y = c.getY();
JButton cible = this.buttonGrilleBas[x-1][y-1];
if(ship == null){
this.colorizeNone(cible);
}
......
Markdown is supported
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