Example #1
0
        static void Main(string[] args)
        {
            var       consoleIO = new ConsoleResponseThingy();
            YatzyGame yatzy     = new YatzyGame(consoleIO);

            yatzy.Play();
        }
Example #2
0
        static void Main(string[] args)
        {
            //YatzyPlayer player1 = new YatzyPlayer("Peter");
            //YatzyPlayer player2 = new YatzyPlayer("Dennis");
            YatzyGame   yatzyGame   = new YatzyGame(2);
            GameManager gameManager = new GameManager();

            yatzyGame.checkDiceEvent      += YatzyGame_checkDice;
            yatzyGame.LockPlayerDiceEvent += YatzyGame_LockPlayerDiceEvent;

            gameManager.GeneratePlayers(yatzyGame.PlayerAmount);

            while (true)
            {
                yatzyGame.Play(gameManager.currentPlayers);
            }
        }