Esempio n. 1
0
        public void SetCellValue(int i_Row, int i_Col, eSymboleType i_Value)
        {
            bool isAvailable = false;

            if (i_Value.Equals(eSymboleType.SpaceSymbole))
            {
                isAvailable = true;
            }
            else if (i_Row == 0 && i_Value.Equals(eSymboleType.FirstPlayerSymbole))
            {
                i_Value = eSymboleType.FirstPlayerKing;
            }
            else if (i_Row == r_BoardSize - 1 && i_Value.Equals(eSymboleType.SecondPlayerSymbole))
            {
                i_Value = eSymboleType.SecondPlayerKing;
            }

            r_Board[i_Row, i_Col].Value     = i_Value;
            r_Board[i_Row, i_Col].Available = isAvailable;
        }
Esempio n. 2
0
        private eDirectionType getPlayerDirection()
        {
            eDirectionType playerDirection;

            if (r_PlayerSymbole.Equals(eSymboleType.SecondPlayerSymbole))
            {
                playerDirection = eDirectionType.SecondPlayerDirection;
            }
            else
            {
                playerDirection = eDirectionType.FirstPlayerDirection;
            }

            return(playerDirection);
        }
Esempio n. 3
0
 public bool IsItAPlayerSymbole(eSymboleType i_Symbole)
 {
     return(i_Symbole.Equals(r_PlayerSymbole) || i_Symbole.Equals(r_KingSymbole));
 }