Exemple #1
0
        public void FlipSymbols(Coordinates i_inputMove)
        {
            m_gameBoard.GameBoard[i_inputMove.Row, i_inputMove.Col].Color = m_CurrentPlayer.CurrentColor;
            foreach (Coordinates PlaceToFlip in m_gameBoard.GameBoard[i_inputMove.Row, i_inputMove.Col].m_CellsToFlip)
            {
                m_gameBoard.GameBoard[PlaceToFlip.Row, PlaceToFlip.Col].Color = m_CurrentPlayer.CurrentColor;
            }

            m_gameBoard.GameBoard[i_inputMove.Row, i_inputMove.Col].m_CellsToFlip.Clear();
        }
 private void addCellToFlip(Board i_gameBoard, int i_Therow, int i_Thecol, int i_RowToBeFlipped, int i_ColToBeFlipped)
 {
     Coordinates CellToFlip = new Coordinates(i_RowToBeFlipped, i_ColToBeFlipped);
     i_gameBoard.GameBoard[i_Therow, i_Thecol].m_CellsToFlip.Add(CellToFlip);
 }
Exemple #3
0
        public bool isMove(Coordinates i_move)
        {
            bool isInList = false;
            foreach (Coordinates item in this.PossibleMoves)
            {
                if (i_move.Col == item.Col && i_move.Row == item.Row)
                {
                    isInList = true;
                }
            }

            return isInList;
        }