diff --git a/src/GomokuCell.java b/src/GomokuCell.java new file mode 100644 index 0000000..b35a513 --- /dev/null +++ b/src/GomokuCell.java @@ -0,0 +1,23 @@ +import java.util.EnumMap; + +public class GomokuCell{ + private EnumMap 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 getAllNeighbour(){ + return neighbour; + } + +}