improvements
This commit is contained in:
@@ -476,4 +476,32 @@ public class GameEngineTests
|
||||
Assert.NotNull(longGameJoke);
|
||||
Assert.False(string.IsNullOrWhiteSpace(longGameJoke.Punchline));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AIPersonality_ChangesLiveAvatar_BasedOnEmotion()
|
||||
{
|
||||
var fox = AIPersonality.Fox;
|
||||
Assert.Equal("fox", fox.Id);
|
||||
Assert.Equal("🦊", fox.GetAvatarForEmotion(PlayerEmotion.Neutral));
|
||||
Assert.Equal("🧐", fox.GetAvatarForEmotion(PlayerEmotion.Thinking));
|
||||
Assert.Equal("🙀", fox.GetAvatarForEmotion(PlayerEmotion.Shocked));
|
||||
Assert.Equal("🥶", fox.GetAvatarForEmotion(PlayerEmotion.Freezing));
|
||||
Assert.Equal("😾", fox.GetAvatarForEmotion(PlayerEmotion.Angry));
|
||||
Assert.Equal("🥳", fox.GetAvatarForEmotion(PlayerEmotion.Celebrating));
|
||||
|
||||
var player = new Player(fox.Name, PlayerType.AI, fox.BaseAvatar, fox.Difficulty, fox.Id);
|
||||
Assert.Equal("🦊", player.GetLiveAvatar());
|
||||
|
||||
player.CurrentEmotion = PlayerEmotion.Shocked;
|
||||
Assert.Equal("🙀", player.GetLiveAvatar());
|
||||
Assert.Equal("💧", player.GetEmotionBadge());
|
||||
|
||||
player.CurrentEmotion = PlayerEmotion.Freezing;
|
||||
Assert.Equal("🥶", player.GetLiveAvatar());
|
||||
Assert.Equal("❄️", player.GetEmotionBadge());
|
||||
|
||||
player.CurrentEmotion = PlayerEmotion.Angry;
|
||||
Assert.Equal("😾", player.GetLiveAvatar());
|
||||
Assert.Equal("🔥", player.GetEmotionBadge());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user