public void move() { //dice1.roll(); //dice2.roll(); //move distance is total of both throws int iMoveDistance = dice1.roll() + dice2.roll(); Console.WriteLine($"{this.getName()}: Rolling Dice: Dice1:[{dice1}] Dice2:[{dice2}]"); //Pined note add something here for random casino relocation??? if (dice1.numberLastRolled() == dice2.numberLastRolled()) { if (++this.DoubleCount >= 3 && playerGoJail != null) { Console.WriteLine($"{this.getName()}: You have rolled double thrice and will be sent to Jail!"); this.playerGoJail(this, new EventArgs()); return; } } else { this.DoubleCount = 0; } //increase location this.setLocation(this.getLocation() + iMoveDistance); this.lastMove = iMoveDistance; }
public void move() { int iMoveDistance = dice1.roll() + dice2.roll(); Console.WriteLine($"{this.getName()}: Rolling Dice: Dice1:[{dice1}] Dice2:[{dice2}]"); if (dice1.numberLastRolled() == dice2.numberLastRolled()) { if (++this.DoubleCount >= 3 && playerGoJail != null) { Console.WriteLine($"{this.getName()}: You have rolled double thrice and will be sent to Jail!"); this.playerGoJail(this, new EventArgs()); return; } } else { this.DoubleCount = 0; } this.setLocation(this.getLocation() + iMoveDistance); this.lastMove = iMoveDistance; }