Package jadex.micro.gobble
Class Board
java.lang.Object
jadex.micro.gobble.Board
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeListener(jadex.micro.gobble.Board.IChangeListener listener) voidvoidList<Board.Move>[]getCellsForCoordinates(List<int[]> coords) getContent(int row, int col) getInventory(int player) intgetPotentiallyWon(List<Board.Move>[] cells, int player) List<int[]> getWinCombinations(int player, BiPredicate<List<Board.Move>[], Integer> filter) intbooleanhasCompletionMove(List<Board.Move>[] cells, int player) booleanhasPotentiallyWon(List<Board.Move>[] cells, int player) booleanhasWon(List<Board.Move>[] cells, int player) booleanisLegalMove(Board.Move move) voidmakeMove(Board.Move move) voidnotifyChange(String message) voidplaceGhost(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
-