Esempio n. 1
0
        private static void Main(string[] args)
        {
            var boxFight = new BoxFight();

            boxFight.AttachObserver(new RiskyPlayer());
            boxFight.AttachObserver(new ConservativePlayer());

            boxFight.NextRound();
            boxFight.NextRound();
            boxFight.NextRound();
            boxFight.NextRound();
        }
Esempio n. 2
0
 public void run()
 {
     var boxFight = new BoxFight();
     var riskyPlayer = new RiskyPlayer();
     var conservativePlayer = new ConservativePlayer();
     boxFight.AttachObserver(riskyPlayer);
     boxFight.AttachObserver(conservativePlayer);
     boxFight.NextRound();
     boxFight.NextRound();
     boxFight.NextRound();
     boxFight.NextRound();
 }