/// <summary>
        /// Checks if this piece matches with other pieces in board main diagonal
        /// </summary>
        /// <param name="board"></param>
        /// <returns></returns>
        public override bool CheckPieceMatch(Board board)
        {
            for (int i = 0; i < board.BoardSize; i++)
            {
                if (!Piece.IsIconEqualToIconFromPiece(board.GetPieceOnRowAndColumn(i, i)))
                {
                    return(false);
                }
            }

            return(true);
        }
예제 #2
0
 private bool HasVerticalMatch(Board board, int i)
 {
     return(Piece.IsIconEqualToIconFromPiece(board.GetPieceOnRowAndColumn(i, Piece.Column)));
 }
예제 #3
0
 private bool HasHorizontalMatch(Board board, int i)
 {
     return(Piece.IsIconEqualToIconFromPiece(board.GetPieceOnRowAndColumn(Piece.Row, i)));
 }