Package jadex.micro.gobble
Class Board
java.lang.Object
jadex.micro.gobble.Board
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static final record
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(jadex.micro.gobble.Board.IChangeListener listener) void
void
List<Board.Move>[]
getCellsForCoordinates
(List<int[]> coords) getContent
(int row, int col) getInventory
(int player) int
getPotentiallyWon
(List<Board.Move>[] cells, int player) List
<int[]> getWinCombinations
(int player, BiPredicate<List<Board.Move>[], Integer> filter) int
boolean
hasCompletionMove
(List<Board.Move>[] cells, int player) boolean
hasPotentiallyWon
(List<Board.Move>[] cells, int player) boolean
hasWon
(List<Board.Move>[] cells, int player) boolean
isLegalMove
(Board.Move move) void
makeMove
(Board.Move move) void
notifyChange
(String message) void
placeGhost
(int row, int col, int gsize)
-
Constructor Details
-
Board
public Board(int rows, int cols, int invsize)
-
-
Method Details
-
getContent
-
addChangeListener
public void addChangeListener(jadex.micro.gobble.Board.IChangeListener listener) -
notifyChange
-
getPlayer
public int getPlayer() -
getWinner
public int getWinner() -
getWinCombination
-
getInventory
-
makeMove
-
placeGhost
public void placeGhost(int row, int col, int gsize) -
getCellsForCoordinates
-
getWinCombinations
public List<List<int[]>> getWinCombinations(int player, BiPredicate<List<Board.Move>[], Integer> filter) -
getCells
-
hasPotentiallyWon
-
hasCompletionMove
-
getPotentiallyWon
-
hasWon
-
checkGhostCount
public void checkGhostCount() -
finishMove
public void finishMove() -
getPossibleMoves
-
isLegalMove
-