Exemplo n.º 1
0
 public void WhenTheGameIsScored()
 {
     var gameBinding = Binding<GameStateBindings>();
     _game = gameBinding.Game;
     _game.Score();
     _scores = _game.Scores;
 }
Exemplo n.º 2
0
        public void LogGameEnd(Game game)
        {
            GameScores scores = game.Score();

            _builder
                .AppendLine("The game has ended!")
                .AppendLine()
                .AppendLine("----- SCORES -----");

            foreach (var item in scores)
                _builder
                    .AppendFormat("{0}: {1}", item.Key.Name, item.Value)
                    .AppendLine();

            _builder.AppendLine();            

            var winner = scores.Winner;                                

            _builder.AppendLine();
            _builder.AppendLine(winner.Name + " is the winner!");


        }