GameLogic
Contains the core game logic for Reversi, including methods to play a piece, check for valid moves, and find capturable pieces.
Functions
Finds all coordinates with 1 cell distance from the given piece that contain the specified type of piece.
Gets a list of available plays for the player with the specified piece type. A play is considered available if placing a piece of the given type at that position would result in capturing at least one of the opponent's pieces.
Gets a list of capturable pieces in a specified direction from the given piece. A piece is considered capturable if it is of the opposite type and is followed by a piece of the same type as myPiece in the specified direction.
Checks if placing a piece at the specified coordinates is a valid move. A move is considered valid if it results in capturing at least one of the opponent's pieces.