Пример #1
0
        // Constructor sets up necessary data structures and objects
        // calls initial methods to setup the board and start the game
        public GameEngine()
        {
            scoreController = new ScoreController();
            board = new int[ROWS][];
            occupied = new List<Cell>();
            available = new List<Cell>();
            merged = new List<Cell>();

            Initializeboard();
            StartGame();
        }
Пример #2
0
        public Minimax(GameEngine gameEngine, int depth)
        {
            this.gameEngine = gameEngine;
            this.scoreController = gameEngine.scoreController;
            available = new List<Cell>();
            this.chosenDepth = depth;

            // setup log file if debug is on
            if (debug)
            {
                logger = new Logger(LOGFILE, depth);
            }
        }
Пример #3
0
 public Expectimax(GameEngine game, int depth)
 {
     this.gameEngine = game;
     this.scoreController = gameEngine.scoreController;
     this.chosenDepth = depth;
 }