/// <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); }
private bool HasVerticalMatch(Board board, int i) { return(Piece.IsIconEqualToIconFromPiece(board.GetPieceOnRowAndColumn(i, Piece.Column))); }
private bool HasHorizontalMatch(Board board, int i) { return(Piece.IsIconEqualToIconFromPiece(board.GetPieceOnRowAndColumn(Piece.Row, i))); }