public void ArenaFloorCanBeCreated() { var a = new Arena(); a.BuildArenaFloor(5); Assert.IsTrue(a.ArenaFloor.Length == 25); }
public void CharacterCannotBeAddedToArenaWhenFloorNotBuilt() { var a = new Arena(); var c = new Character(); c.SetName("YoMomma"); a.AddCharacterToArena(c); }
public void ShouldCreateArenaFloor() { var a = new Arena(); a.BuildArenaFloor(5); Assert.IsTrue(a.ArenaFloor.Length == 25); }
public void ShouldAddPlayerToArena() { var p = new Player(); var a = new Arena(); a.BuildArenaFloor(5); a.AddCharacterToArena(p, Alliance.TeamOne); Assert.IsTrue(a.Characters.Contains(p)); }
public void ShouldAddPlayerToDefaultPosition() { var p = new Player(); var a = new Arena(); a.BuildArenaFloor(5); a.AddCharacterToArena(p, Alliance.TeamOne); Assert.IsTrue(p.ArenaLocation.GetTileLocation().XCoord == 0 && p.ArenaLocation.GetTileLocation().YCoord == 4); }
public void ShouldAddOpponentToDefaultPosition() { var b = new Dumbass(); var a = new Arena(); a.BuildArenaFloor(5); a.AddCharacterToArena(b, Alliance.TeamTwo); Assert.IsTrue(b.ArenaLocation.GetTileLocation().XCoord == 4 && b.ArenaLocation.GetTileLocation().YCoord == 0); }
public void PlayerAddedToArenaDefaultLocationIsBottomLeftCentreOfArenaForEvenWidth() { var p = new Player(); var a = new Arena(); a.BuildArenaFloor(8); a.AddPlayerToArena(p); a.SetDefaultPlayerLocation(); Assert.IsTrue(p.CharacterLocation.XCoord == a.ArenaFloor.GetLength(0) - 1 && p.CharacterLocation.YCoord == 3); }
public void ShouldAddCharacterToArena() { var a = new Arena(); a.BuildArenaFloor(5); var c = new Player(); c.SetName("YoMomma"); a.AddCharacterToArena(c, Alliance.TeamOne); Assert.IsTrue(a.Characters.Exists(i => i.Name == "YoMomma")); }
public void CharacterCanBeAddedToArena() { var a = new Arena(); a.BuildArenaFloor(5); var c = new Character(); c.SetName("YoMomma"); a.AddCharacterToArena(c); Assert.IsTrue(a.Characters.Exists(i => i.Name == "YoMomma")); }
public void ShouldAddDumbassBotToArena() { var arena = new Arena(); arena.BuildArenaFloor(5); var p = new Player(); EquipmentHelper.EquipEquipment(p, new Sword()); arena.AddCharacterToArena(p, Alliance.TeamOne); var b = new Dumbass(); b.SetName("Dumbass Bot"); EquipmentHelper.EquipEquipment(b, new Sword()); arena.AddCharacterToArena(b, Alliance.TeamTwo); }
public void ShouldNotHaveAttackActionWhenOutOfRange() { var a = new Arena(); a.BuildArenaFloor(10); var c = new Player(); a.AddCharacterToArena(c, Alliance.TeamOne, 0, 0); var o = new Dumbass(); a.AddCharacterToArena(o, Alliance.TeamTwo, 5, 5); var e = new Sword(); EquipmentHelper.EquipEquipment(c, e); var tile = a.SelectFloorTile(o.ArenaLocation.GetTileLocation()); var actions = c.TargetTileAndSelectActions(tile); Assert.IsFalse(actions.Exists(i => i.Name == "Swing")); }
public ActionResult Arena() { var p = (Player)Session["Player"]; if (p == null) { ModelState.AddModelError(string.Empty, "You must create a character first."); return View("Index"); } var a = new Arena(); a.BuildArenaFloor(5); a.AddPlayerToArena(p); Session["Arena"] = a; return View("Arena", a); }
public void ShouldNotAddCharacterToArenaWhenFloorNotBuilt() { var a = new Arena(); var c = new Player(); c.SetName("YoMomma"); a.AddCharacterToArena(c, Alliance.TeamOne); }
public void PlayerDefaultLocationCannotBeSetIfPlayerNull() { var a = new Arena(); a.BuildArenaFloor(5); a.SetDefaultPlayerLocation(); }
public void PlayerDefaultLocationCannotBeSetIfArenaFloorNull() { var p = new Player(); var a = new Arena(); a.AddPlayerToArena(p); a.SetDefaultPlayerLocation(); }
public void ShouldNotAddPlayerToArenaWhenFloorNotBuilt() { var p = new Player(); var a = new Arena(); a.AddCharacterToArena(p, Alliance.TeamOne); }
public void PlayerCanBeAddedToArena() { var p = new Player(); var a = new Arena(); a.BuildArenaFloor(5); a.AddPlayerToArena(p); Assert.IsTrue(a.Player == p); }
public void ShouldNotSetPlayerLocationIfArenaFloorNull() { var p = new Player(); var a = new Arena(); a.AddCharacterToArena(p, Alliance.TeamOne); }
public void PlayerCannotBeAddedToArenaWhenFloorNotBuilt() { var p = new Player(); var a = new Arena(); a.AddPlayerToArena(p); }
protected void CreateArena() { arena = new Arena.Arena(); player = new Player(); }