示例#1
0
        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));
        }
示例#2
0
        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);
        }