From edb3ffffa255534469f056cf40a6dcb97b1d4595 Mon Sep 17 00:00:00 2001 From: Aubin DORIVAL Date: Mon, 24 Mar 2025 10:25:48 +0100 Subject: [PATCH] cell --- src/GomokuCell.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/GomokuCell.java 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; + } + +}