public void GivenOpponentHasStealthMinion_WhenGetAllAttackActionsInvoked_ThenStealthMinionCannotBeAttacked() { var aChar = new Minion(1, 1); var bStealthChar = new Minion(1, 1, Status.Stealth); var bFace = Face.Empty; var gameState = new GameState( PlayerGameState.Empty.With(_player, minions: x => ImmutableList.Create(aChar)), PlayerGameState.Empty.With(face: x => bFace, minions: x => ImmutableList.Create(bStealthChar))); var expectedAction = new AttackAction(_player, aChar, bFace); CollectionAssert.AreEquivalent(expectedAction.Yield(), _testee.GetAllAttackActions(gameState, _player)); }
public void GivenOpponentHasTauntMinion_WhenGetAllAttackActionsInvoked_ThenOnlyTauntMinionCanBeAttacked() { var aChar = new Minion(1, 1); var bChar = new Minion(1, 1); var bTauntChar = new Minion(1, 1, Status.Taunt); var gameState = GameState.Empty.With( PlayerGameState.Empty.With(_player, minions: x => ImmutableList.Create(aChar)), PlayerGameState.Empty.With(Player.Empty, minions: x => ImmutableList.Create(bTauntChar, bChar))); var expectedAction = new AttackAction(_player, aChar, bTauntChar); CollectionAssert.AreEquivalent(expectedAction.Yield(), _testee.GetAllAttackActions(gameState, _player)); }
public void GivenPlayerHasZeroAttackMinion_WhenGetAllAttackActionsInvoked_ThenZeroAttackMinionCannotAttack() { var aChar = new Minion(1, 1); var aZeroAttackChar = new Minion(0, 1); var bFace = Face.Empty; var gameState = new GameState( PlayerGameState.Empty.With(_player, minions: x => ImmutableList.Create(aChar, aZeroAttackChar)), PlayerGameState.Empty.With(face: x => bFace)); var expectedAction = new AttackAction(_player, aChar, bFace); CollectionAssert.AreEquivalent(expectedAction.Yield(), _testee.GetAllAttackActions(gameState, _player)); }
public void GivenPlayerHasFrozenMinion_WhenGetAllAttackActionsInvoked_ThenFrozenMinionCannotAttack() { var player = new Player(); var aChar = new Minion(1, 1); var aFrozenChar = new Minion(1, 1, Status.Frozen); var bFace = Face.Empty; var gameState = GameState.Empty.With( PlayerGameState.Empty.With(player, minions: x => ImmutableList.Create(aChar, aFrozenChar)), PlayerGameState.Empty.With(face: x => bFace)); var expectedAction = new AttackAction(player, aChar, bFace); CollectionAssert.AreEquivalent(expectedAction.Yield(), _testee.GetAllAttackActions(gameState, player)); }