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 boolean
canCellBeSelected(byte[][] board, int row, int col)
boolean
canCellBeSelected(int row, int col)
boolean
equals(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.String
getBoardAsString()
java.util.Map<java.lang.Integer,java.lang.Integer>
getNumberOfPiecesPerColor()
int
getNumCols()
int
getNumPieces()
int
getNumRows()
short
getScore()
SameGameState
getStateAfterMove(byte row, byte col)
SameGameState
getStateAfterMove(java.util.Collection<SameGameCell> block)
int
hashCode()
boolean
isMovePossible()
static boolean
isMovePossible(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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-