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; }
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 ); }
public int GetCellNumber( Cell curPosition ) { return curPosition.Index; }