コード例 #1
0
        static void Main(string[] args)
        {
            Player      smarty            = new SmartyPlayer();
            BatchGames  bgSmarty          = new BatchGames(smarty);
            ResultsView resultsViewSmarty = new ResultsView(smarty, bgSmarty);

            resultsViewSmarty.PrintResult();

            Player      abcPlayer      = new ABCplayer();
            BatchGames  bgABC          = new BatchGames(abcPlayer);
            ResultsView resultsViewABC = new ResultsView(abcPlayer, bgABC);

            resultsViewABC.PrintResult();

            Player      randy            = new RandomPlayer();
            BatchGames  bgRandy          = new BatchGames(randy);
            ResultsView resultsViewRandy = new ResultsView(randy, bgRandy);

            resultsViewRandy.PrintResult();
        }
コード例 #2
0
 public ResultsView(Player player, BatchGames batchGame)
 {
     this.player    = player;
     this.batchGame = batchGame;
     this.guesses   = batchGame.SetGameSpeed();
 }