Пример #1
0
        static void Main(string[] args)
        {
            Dice[] dices  = new Dice[5];
            Random random = new Random();

            for (int i = 0; i < 5; i += 1)
            {
                dices[i] = new Dice(random);
            }

            YahtzeeSet  diceSet  = new YahtzeeSet(dices);
            Score       score    = new Score(diceSet);
            GameLogic   logic    = new GameLogic(diceSet, score);
            UserConsole console  = new UserConsole();
            YahtzeeView view     = new YahtzeeView(diceSet, score, console);
            GameLoop    gameLoop = new GameLoop(view, logic);

            gameLoop.Loop();
        }
Пример #2
0
 public YahtzeeView(YahtzeeSet yahtzeeSet, Score score, UserConsole userConsole)
 {
     YahtzeeSet  = yahtzeeSet;
     Score       = score;
     UserConsole = userConsole;
 }
Пример #3
0
 public GameLogic(YahtzeeSet yahtzeeSet, Score score)
 {
     YahtzeeSet = yahtzeeSet;
     Score      = score;
 }
Пример #4
0
 public Score(YahtzeeSet yahtzeeSet)
 {
     YahtzeeSet = yahtzeeSet;
 }