improvements

This commit is contained in:
Michal Vrba
2026-09-04 10:01:22 +02:00
parent 9005b4b9be
commit 7ca0e08637
15 changed files with 715 additions and 65 deletions
+28
View File
@@ -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());
}
}