This commit is contained in:
Aubin DORIVAL
2025-03-24 10:25:48 +01:00
parent 8d717ff1a5
commit edb3ffffa2

23
src/GomokuCell.java Normal file
View File

@@ -0,0 +1,23 @@
import java.util.EnumMap;
public class GomokuCell{
private EnumMap<Cardinal,GomokuCell> neighbour;
public Color state;
public GomokuCell(){
this.neighbour = new EnumMap<>(Cardinal.class);
}
public void linkCell(Cardinal car, GomokuCell cell){
this.neighbour.put(car, cell);
}
public GomokuCell getNeighbour(Cardinal car){
return this.neighbour.get(car);
}
public EnumMap<Cardinal, GomokuCell> getAllNeighbour(){
return neighbour;
}
}