コード例 #1
0
        internal int _maxdepth;  // max depth (for new board)

        //-- factories

        // create a game model with board & setup
        internal static GameModel Create(GameDef gamedef, ChooserKinds chooserkind = ChooserKinds.Mcts)
        {
            var gm = new GameModel {
                Def          = gamedef,
                Rng          = new Random(),
                _gamecode    = gamedef.Code,
                _chooserkind = chooserkind,
                _stepcount   = 10, // unuseful defaults
                _maxdepth    = 2,
            };

            gm.NewBoard();
            return(gm);
        }
コード例 #2
0
 internal GameDef Exec(bool isvariant)
 {
     _gamedef = GameDef.Create(this, isvariant);
     EvalExec();
     return(_gamedef);
 }