Ejemplo n.º 1
0
 public Player(string i_PlayerName, Cell.Sign i_Sign, bool i_IsComputer)
 {
     this.m_Name       = i_PlayerName;
     this.m_IsComputer = i_IsComputer;
     this.m_Sign       = i_Sign;
     this.m_Score      = 0;
 }
Ejemplo n.º 2
0
        // Write to cell by the computer, counts on ranodm choose of cell in m_FreeCells
        public void WriteToCell(sbyte i_index, Cell.Sign i_Sign)
        {
            // getting the cell index on the free list
            sbyte indexofcell = i_index;

            // change the sing and remove it from the free
            if (indexofcell != -1)
            {
                this.m_FreeCells[indexofcell].CellSign = i_Sign;
                this.m_FreeCells.RemoveAt(indexofcell);
            }
        }
Ejemplo n.º 3
0
        // Write the sing to the cell and remove the cell from free list
        // returning the cell by location + if the cell was empty
        public void WriteToCell(sbyte i_Col, sbyte i_Row, Cell.Sign i_Sign)
        {
            // getting the cell index on the free list

            int indexofcell = this.getFreeCellIndex(i_Row, i_Col);

            // change the sing and remove it from the free
            //********************* To Do - exception -1 *********************
            if (indexofcell != -1)
            {
                this.m_FreeCells[indexofcell].CellSign = i_Sign;
                this.m_FreeCells.RemoveAt(indexofcell);
            }
        }