GR.Gambling.Backgammon.Board.Equals C# (CSharp) Method

Equals() public method

public Equals ( Board board ) : bool
board Board
return bool
        public bool Equals(Board board)
        {
            if (this.captured[0] != board.captured[0] ||
                this.captured[1] != board.captured[1] ||
                this.finished[0] != board.finished[0] ||
                this.finished[1] != board.finished[1])
                return false;

            for (int i = 0; i < 24; i++)
            {
                if (this.board[0][i] != board.board[0][i] ||
                    this.board[1][i] != board.board[1][i])
                    return false;
            }

            return true;
        }