using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Web; namespace Chruch.Net.Models.IceBreak { public enum GameType { WereWolf, WhoIsSpy } public class GameRoom { GameType Type { get; set; } public string Id { get; set; } private List _players; public int TotalPlayer => Players.Count; public List Players { get { if (_players == null) { _players = new List(); } return _players; } set => _players = value; } } public class GamePlayer { public string Id { get; set; } [Required] public string Name { get; set; } public string TempGameRoomId { get; set; } } public enum WhoIsSpyProcess { WaitForPlayer, Started, Votting, DisplayResult, End, Closed } public class WhoIsSpyGameRoom: GameRoom { public WhoIsSpyGameRoom() { PlayedAnswerId=new List(); } public int Question { get; set; } [Required] public int SpyAmount { get; set; } [Required] public int EmptyAmount { get; set; } public int StartIndex { get; set; } public WhoIsSpyAnswer Answer { get; set; } public WhoIsSpyAnswer SpysAnswer { get; set; } public WhoIsSpyProcess Status { get; set; } public List PlayedAnswerId { get; set; } public int VoteAmount { get; set; } } public class WhoIsSpyPlayer { public string Id { get; set; } public string RoomId { get; set; } public int Seed { get; set; } public string Name { get; set; } public WhoIsSpyAnswer Answer { get; set; } public bool IsSpy { get; set; } public bool IsDead { get; set; } public WhoIsSpyProcess GameStatus { get; set; } public List VoteTo { get; set; } public int ReceviedVotes { get; set; } public int VoteAmount { get; set; } public List VoteOption { get; set; } } public class WhoIsSpyVoteOption { public WhoIsSpyVoteOption(string id, string name) { Id = id; Name = name; } public string Id { get; set; } public string Name { get; set; } } public class WhoIsSpyAnswer { public WhoIsSpyAnswer() { } public WhoIsSpyAnswer(string answerCht, string answerChs, string answerEn, string answerImage) { AnswerCht = answerCht; AnswerChs = answerChs; AnswerEn = answerEn; AnswerImage = answerImage; } public string AnswerCht { get; set; } public string AnswerChs { get; set; } public string AnswerEn { get; set; } public string AnswerImage { get; set; } } }