Displaying.

This commit is contained in:
aminecmi 2015-01-31 11:54:08 +01:00
parent 673ea047b7
commit 25c10eee4a
3 changed files with 10 additions and 1 deletions

View File

@ -85,4 +85,6 @@ public abstract class CaseAbstraite {
public void setVoisins(HashMap<PointsCardinaux, CaseAbstraite> voisins) {
this.voisins = voisins;
}
public abstract String affichageSpecial();
}

View File

@ -10,6 +10,13 @@ public class CaseColore extends CaseAbstraite {
this.couleur = Color.WHITE;
}
@Override
public String affichageSpecial() {
if (this.couleur.getRGB() < 0)
return String.valueOf(String.valueOf(this.couleur.getRGB()).charAt(0));
return " ";
}
public Color getCouleur() {
return couleur;
}

View File

@ -15,7 +15,7 @@ public class InterfaceConsole {
if (plateau[i][j].getOccupant() != null) {
System.out.print(plateau[i][j].getOccupant().getNom().charAt(0) + " | ");
} else {
System.out.print(" | ");
System.out.print(" " + plateau[i][j].affichageSpecial() + " | ");
}
}
System.out.println();