Esempio n. 1
0
        public void WhenDefeated_ThenThrowDefeatedException()
        {
            var player = new Player {
                Id = Guid.NewGuid(), Health = 0
            };
            var unitOfWork = new UnitOfWork();
            var town1      = new Town {
                Id = Guid.NewGuid(), Name = "Town 1"
            };
            var town2 = new Town {
                Id = Guid.NewGuid(), Name = "Town 2"
            };

            unitOfWork.Towns.Add(town1);
            unitOfWork.Towns.Add(town2);
            var route = new Route {
                Id = Guid.NewGuid(), StartingPoint = town1.Id, Destination = town2.Id
            };

            unitOfWork.Routes.Add(route);
            var settings = new Settings {
                StartingTown = town1.Id
            };
            var game = new MonsterHuntGame(player, unitOfWork, settings);

            Assert.Throws <DefeatedException>(() => game.GoToTown("town 2"));
        }
Esempio n. 2
0
 public EquipCommand(MonsterHuntGame game)
 {
     this.game = game;
 }
Esempio n. 3
0
 public GoToCommand(MonsterHuntGame game)
 {
     this.game = game;
 }
Esempio n. 4
0
 public MakeCommand(MonsterHuntGame game)
 {
     this.game = game;
 }
Esempio n. 5
0
 public InventoryCommand(MonsterHuntGame game)
 {
     this.game = game;
 }
Esempio n. 6
0
 public LearnCommand(MonsterHuntGame game)
 {
     this.game = game;
 }
Esempio n. 7
0
 public SellCommand(MonsterHuntGame game)
 {
     this.game = game;
 }
Esempio n. 8
0
 public StatsCommand(MonsterHuntGame game, UnitOfWork unitOfWork)
 {
     this.game       = game;
     this.unitOfWork = unitOfWork;
 }
Esempio n. 9
0
 public RecipesCommand(MonsterHuntGame game)
 {
     this.game = game;
 }
Esempio n. 10
0
 public RequestsCommand(MonsterHuntGame game)
 {
     this.game = game;
 }
Esempio n. 11
0
 public AttackCommand(MonsterHuntGame game)
 {
     this.game = game;
 }
Esempio n. 12
0
 public BuyCommand(MonsterHuntGame game)
 {
     this.game = game;
 }
Esempio n. 13
0
 public OffersCommand(MonsterHuntGame game)
 {
     this.game = game;
 }