public override IPlay <TGameKind> GetPlay(TableState <TGameKind> table) { Random r = new Random(); var plays = table.PossiblesPlays(); int select = r.Next(plays.Count()); return(plays.ElementAt(select)); }
public override IPlay <TGameKind> GetPlay(TableState <TGameKind> table) { double maxScoresPlay = double.MinValue; IPlay <TGameKind> result = null; foreach (var play in table.PossiblesPlays()) { double score = table.PlayScore(play); if (score > maxScoresPlay) { maxScoresPlay = score; result = play; } } return(result); }