Example #1
0
 public GoToJailCell(int index, Cell ptrJailCell)
     : base(index, "Goto Jail Cell")
 {
     //position will be index 30
     Debug.WriteLine("GoToJail Cell Created with index" + index);
     this.refOfJailCell = ptrJailCell;
 }
Example #2
0
        public Cell MoveToAnotherCell(Cell curPosition , int distance , out bool isTurn )
        {
            int newIndex;

            newIndex = ( curPosition.Index) + distance;
            if ( newIndex >= NUM_OF_CELL )
            {
                isTurn = true;
                newIndex = newIndex - NUM_OF_CELL;
            }
            else
            {
                isTurn = false;
            }
            return cells.ElementAt ( newIndex );
        }
Example #3
0
 public int GetCellNumber( Cell curPosition )
 {
     return curPosition.Index;
 }