コード例 #1
0
        private int Play()
        {
            var gameManager = GameManagerFactory.Create();

            log.Info(gameManager);

            var tactics = this.tactics
                          .Select(t => t());

            gameManager.Play(tactics);

            log.Info(gameManager);

            return(gameManager.Score);
        }
コード例 #2
0
        public void Start()
        {
            Choice      player1Choice;
            GameManager gm = GameManagerFactory.Create();

            while (true)
            {
                Console.Clear();
                player1Choice = ConsoleInput.GetChoiceFromUser();
                PlayRoundResponse response = gm.PlayRound(player1Choice);

                ConsoleOutput.DisplayResult(response);

                if (!ConsoleInput.QueryPlayAgain())
                {
                    return;
                }
            }
        }