Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var consoleOperations = new ConsoleOperations();
            var playerHuman       = new PlayerHuman(consoleOperations, "Tony");
            var playerHuman2      = new PlayerHuman(consoleOperations, "Helena");
            var playerList        = new List <IPlayer>()
            {
                playerHuman, playerHuman2
            };
            var playerComputer = new PlayerComputer(consoleOperations);

            var game = new Game(consoleOperations, playerList, new RandomChooser());

            game.Start();
        }
Ejemplo n.º 2
0
        public int GetScoreFor(PlayerHuman player)
        {
            var playerHand = _humanPlayers.FirstOrDefault(pl => pl.GetName() == player.Name);

            return(playerHand.GetScore());
        }