From 3acd568e4e6b9592a9a882281e3dd68017b280ee Mon Sep 17 00:00:00 2001 From: Dorian HAMDANI Date: Mon, 14 Apr 2025 09:26:31 +0200 Subject: [PATCH] Remove old countAlignedCells method --- src/GomokuBoard.java | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/GomokuBoard.java b/src/GomokuBoard.java index 4cba30f..2edc5a0 100644 --- a/src/GomokuBoard.java +++ b/src/GomokuBoard.java @@ -1,11 +1,7 @@ import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; -<<<<<<< HEAD -======= import java.util.EnumMap; ->>>>>>> 20e2f2eaec0f2988bef55ac30d3f0b3f123b171d /** * The board of the game Gomoku. @@ -238,20 +234,7 @@ public class GomokuBoard { * @param cell A cell. * @return Map of number aligned cells. */ - public Map countAlignedCells(GomokuCell cell) { - - Map map = new HashMap<>(); - Map mapColor = cell.getSameColorNeighbour(); - - map.put(Cardinal.N, mapColor.get(Cardinal.N) + mapColor.get(Cardinal.S) + 1); - map.put(Cardinal.W, mapColor.get(Cardinal.W) + mapColor.get(Cardinal.E) + 1); - map.put(Cardinal.NW, mapColor.get(Cardinal.NW) + mapColor.get(Cardinal.SE) + 1); - map.put(Cardinal.SW, mapColor.get(Cardinal.SW) + mapColor.get(Cardinal.NE) + 1); - - return map; - } - - public EnumMap countAlignedCellsv2(GomokuCell cell) { + public EnumMap countAlignedCells(GomokuCell cell) { EnumMap map = new EnumMap<>(Cardinal.class);