47 lines
1.0 KiB
C#
47 lines
1.0 KiB
C#
namespace Faraon.Core.Models;
|
|
|
|
public enum PlayerType
|
|
{
|
|
Human = 0,
|
|
AI = 1
|
|
}
|
|
|
|
public enum AIDifficulty
|
|
{
|
|
Easy = 0,
|
|
Medium = 1,
|
|
Hard = 2
|
|
}
|
|
|
|
public class Player
|
|
{
|
|
public string Id { get; init; } = Guid.NewGuid().ToString("N");
|
|
public string Name { get; set; } = "Hráč";
|
|
public PlayerType Type { get; set; } = PlayerType.Human;
|
|
public AIDifficulty Difficulty { get; set; } = AIDifficulty.Medium;
|
|
public string Avatar { get; set; } = "👑";
|
|
public List<Card> Hand { get; } = new();
|
|
|
|
public int? FinishedPosition { get; set; }
|
|
public bool HasFinished => FinishedPosition.HasValue;
|
|
|
|
public bool IsSkipped { get; set; }
|
|
|
|
public Player() { }
|
|
|
|
public Player(string name, PlayerType type, string avatar = "👤", AIDifficulty difficulty = AIDifficulty.Medium)
|
|
{
|
|
Name = name;
|
|
Type = type;
|
|
Avatar = avatar;
|
|
Difficulty = difficulty;
|
|
}
|
|
|
|
public void Reset()
|
|
{
|
|
Hand.Clear();
|
|
FinishedPosition = null;
|
|
IsSkipped = false;
|
|
}
|
|
}
|