public DayInstruction(Game game, DayFormModel model) { Actor = game.Players.Where(p => p.Id == model.ActorId).Single(); JailVote = game.Players.Where(p => p.Id == model.JailWhom).SingleOrDefault(); StakeVote = game.Players.Where(p => p.Id == model.KillWhom).SingleOrDefault(); Weight = Actor.IsMayor ? 1.1 : 1; }
public DayFormModel GetDayInstruction(List <string> ids, int turnId) { Daily(); var otherIds = ids.Where(x => x != Me.Id).ToList(); var d = new DayFormModel() { ActorId = Me.Id, TurnId = turnId }; if (otherIds.Any()) { d.JailWhom = RandomId(ids); d.KillWhom = PickEnemy(.9); } //if (r.Next(10) < 5 - (turnId / 2)) //{ // d.KillWhom = null; //} if (r.NextDouble() * 10 - 1 < SuspicionAgainstMe) { d.JailWhom = Me.Id; } ; if (d.KillWhom != null) { SuspicionAgainstMe += .1; } return(d); }