Class SameGameState
- java.lang.Object
-
- ai.libs.jaicore.problems.samegame.SameGameState
-
public class SameGameState extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SameGameState(byte[][] board)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancanCellBeSelected(byte[][] board, int row, int col)booleancanCellBeSelected(int row, int col)booleanequals(java.lang.Object obj)java.util.List<SameGameCell>getAllConnectedPiecesOfSameColor(byte row, byte col)java.util.Collection<java.util.Collection<SameGameCell>>getBlocksOfPieces()byte[][]getBoard()java.lang.StringgetBoardAsString()java.util.Map<java.lang.Integer,java.lang.Integer>getNumberOfPiecesPerColor()intgetNumCols()intgetNumPieces()intgetNumRows()shortgetScore()SameGameStategetStateAfterMove(byte row, byte col)SameGameStategetStateAfterMove(java.util.Collection<SameGameCell> block)inthashCode()booleanisMovePossible()static booleanisMovePossible(byte[][] board)
-
-
-
Method Detail
-
getStateAfterMove
public SameGameState getStateAfterMove(java.util.Collection<SameGameCell> block)
-
getStateAfterMove
public SameGameState getStateAfterMove(byte row, byte col)
-
getAllConnectedPiecesOfSameColor
public java.util.List<SameGameCell> getAllConnectedPiecesOfSameColor(byte row, byte col)
-
getBoardAsString
public java.lang.String getBoardAsString()
-
getBoard
public byte[][] getBoard()
-
getNumRows
public int getNumRows()
-
getNumCols
public int getNumCols()
-
getBlocksOfPieces
public java.util.Collection<java.util.Collection<SameGameCell>> getBlocksOfPieces()
-
getScore
public short getScore()
-
getNumPieces
public int getNumPieces()
-
isMovePossible
public static boolean isMovePossible(byte[][] board)
-
isMovePossible
public boolean isMovePossible()
-
canCellBeSelected
public boolean canCellBeSelected(int row, int col)
-
canCellBeSelected
public static boolean canCellBeSelected(byte[][] board, int row, int col)
-
getNumberOfPiecesPerColor
public java.util.Map<java.lang.Integer,java.lang.Integer> getNumberOfPiecesPerColor()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-