public void FriendlinessIncreasesOver100_BlockFromTop_Equals100() { var mockAnchiornis = new Anchiornis(); mockAnchiornis.IncreaseFriendliness(100); Assert.Equal(mockAnchiornis.friendliness, mockAnchiornis.maxFriendliness); }
public void ArchaeopteryxUs_SocialCoefficientIncreased_AnchiornisMoreAttractedThanOther() { var mockCharacter = new Character(); var mockArchaeopteryx = new Archaeopteryx(); mockCharacter.CreditArchaeopteryx(mockArchaeopteryx); var mockFriendlyAnchiornis = new Anchiornis(); var mockUnfriendlyAnchiornis = new Anchiornis(); mockFriendlyAnchiornis.IncreaseFriendliness(15); mockUnfriendlyAnchiornis.IncreaseFriendliness(15); var mockTile = new MockTile(mockCharacter, 3, 3, 2, 2); mockArchaeopteryx.OnUs(mockCharacter, mockFriendlyAnchiornis, mockTile); mockUnfriendlyAnchiornis.IncreaseFriendliness(mockCharacter.socialCoefficient); var friendlinessIsNotEqual = mockFriendlyAnchiornis.friendliness == mockUnfriendlyAnchiornis.friendliness; Assert.False(friendlinessIsNotEqual); }
public void FriendlinessIncrease_Increased_UpTo50() { var mockAnchiornis = new Anchiornis(); mockAnchiornis.IncreaseFriendliness(20); int mockAnchiornisFriendliness = 50; Assert.Equal(mockAnchiornis.friendliness, mockAnchiornisFriendliness); }
public void JoinFriendlyAnchiornis_AnchiornisAgrees_True() { var mockCharacter = new Character(); var mockAnchiornis = new Anchiornis(); mockAnchiornis.IncreaseFriendliness(25); mockCharacter.AddToPack(mockAnchiornis); var packCount = mockCharacter.pack.Count; Assert.Equal(1, packCount); }
public void JoinWithInteraction_AnchiornisAgrees_True() { var pack = new Pack <Anchiornis>(); var mockAnchiornis = new Anchiornis(); mockAnchiornis.IncreaseFriendliness(25); pack.Join(mockAnchiornis); var packCount = pack.Count; Assert.True(packCount > 0); }
public void JoinNeutralAnchiornisToPack_AnchiornisRefuses_True() { var mockCharacter = new Character(); var mockAnchiornis = new Anchiornis(); mockAnchiornis.IncreaseFriendliness(25); mockCharacter.AddToPack(mockAnchiornis); var neutralAnchiornis = new Anchiornis(); mockCharacter.AddToPack(neutralAnchiornis); var packCount = mockCharacter.pack.Count; Assert.Equal(1, packCount); }
public void ArchaeopteryxOpened_PackEntersTerritory_PackInCreatures() { var mockCharacter = new Character(); mockCharacter.CreditArchaeopteryx(new Archaeopteryx()); var mockAnchiornis = new Anchiornis(); mockAnchiornis.IncreaseFriendliness(25); mockCharacter.AddToPack(mockAnchiornis); var mockTile = new MockTile(mockCharacter, 3, 3, 2, 2); var mockTerritory = new MockHiddenTerritory(mockCharacter, new Archaeopteryx(), mockTile); mockTerritory.OpenTerritory(mockCharacter); mockTerritory.EnterTerritory(mockCharacter); var packMoved = mockTerritory.creatures.Contains(mockAnchiornis); Assert.True(packMoved); }
public void movementWithPack_packMoved_True() { var mockCharacter = new Character(); var mockAnchiornis = new Anchiornis(); mockAnchiornis.IncreaseFriendliness(25); mockCharacter.AddToPack(mockAnchiornis); var mockTile = new MockTile(mockCharacter, 3, 3, 2, 2); mockTile.creatures = new List <ICreature>() { mockCharacter, mockAnchiornis }; var movement = mockCharacter.Move(mockTile, ICreature.direction.N) as ITile; bool packMoved = movement.creatures.Contains(mockAnchiornis) ? true : false; Assert.True(packMoved); }
public void OnlyPackMoved_CharacterOnNextTile_True() { var mockCharacter = new Character(); var mockAnchiornis = new Anchiornis(); var neutralAnchiornis = new Anchiornis(); mockAnchiornis.IncreaseFriendliness(25); mockCharacter.AddToPack(mockAnchiornis); var mockTile = new MockTile(mockCharacter, 3, 3, 2, 2); mockTile.creatures = new List <ICreature>() { mockCharacter, mockAnchiornis, neutralAnchiornis }; var movement = mockCharacter.Move(mockTile, ICreature.direction.NW) as ITile; bool characterMoved = movement.creatures.Contains(mockCharacter) ? true : false; Assert.True(characterMoved); }
public void PackMovingFromEnemy_enemyFailedPackMoved_False() { var mockCharacter = new Character(); var mockAnchiornis = new Anchiornis(); var enemyAnchiornis = new Anchiornis(); mockAnchiornis.IncreaseFriendliness(25); mockCharacter.AddToPack(mockAnchiornis); var mockTile = new MockTile(mockCharacter, 3, 3, 2, 2); mockTile.creatures = new List <ICreature>() { mockCharacter, mockAnchiornis, enemyAnchiornis }; var movement = mockCharacter.Move(mockTile, ICreature.direction.N) as ITile; enemyAnchiornis.Move(mockTile, movement, false); bool packMoved = movement.creatures.Contains(mockAnchiornis) ? true : false; bool enemyMoved = movement.creatures.Contains(enemyAnchiornis) ? true : false; Assert.True(packMoved); Assert.False(enemyMoved); }
public void OnUs(Character character, Anchiornis us, ITerritory territory) { Console.WriteLine($"You are spreading your feathers, trying to attract the attention of {us.name}"); us.IncreaseFriendliness(character.socialCoefficient + 1); CoolDownSet(); }