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")); }
public EquipCommand(MonsterHuntGame game) { this.game = game; }
public GoToCommand(MonsterHuntGame game) { this.game = game; }
public MakeCommand(MonsterHuntGame game) { this.game = game; }
public InventoryCommand(MonsterHuntGame game) { this.game = game; }
public LearnCommand(MonsterHuntGame game) { this.game = game; }
public SellCommand(MonsterHuntGame game) { this.game = game; }
public StatsCommand(MonsterHuntGame game, UnitOfWork unitOfWork) { this.game = game; this.unitOfWork = unitOfWork; }
public RecipesCommand(MonsterHuntGame game) { this.game = game; }
public RequestsCommand(MonsterHuntGame game) { this.game = game; }
public AttackCommand(MonsterHuntGame game) { this.game = game; }
public BuyCommand(MonsterHuntGame game) { this.game = game; }
public OffersCommand(MonsterHuntGame game) { this.game = game; }