private void RollDice(Dice a_dice) { a_dice.Roll(); foreach (DiceGameObserver o in m_observers) { o.DiceRolled(a_dice.GetValue()); } }
private void RollDice(Dice a_dice) { a_dice.Roll(); // rolla tärningen och får värdet foreach (DiceGameObserver o in m_observers) { o.DiceRolled(a_dice.GetValue()); } }
public bool Play() { RollDice(m_d1); System.Threading.Thread.Sleep(2000); RollDice(m_d2); System.Threading.Thread.Sleep(2000); RollDice(m_d3); return(m_d1.GetValue() + m_d2.GetValue() + m_d3.GetValue() == 9); }
public int GetDice2Value() { return(m_d2.GetValue()); }
public int GetDice1Value() { return(m_d1.GetValue()); }