Exemple #1
0
 public void initAI()
 {
     engine = GameManager.getInstance();
     playerID = engine.playerid;
     size=engine.getMapSize();
     map=new Cell[size,size];
     playrs= engine.getPlayers();
     initMap();
 }
Exemple #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            graphics.PreferredBackBufferWidth = mapResolution+panelResolution;
            graphics.PreferredBackBufferHeight = mapResolution;
            graphics.IsFullScreen = false;
            playerColr = new Color[5];
            playerColr[0] = Color.Blue;
            playerColr[1] = Color.Red;
            playerColr[2] = Color.Orange;
            playerColr[3] = Color.Green;
            playerColr[4] = Color.Yellow;
            size = mapResolution / gridsize;
            engine=GameManager.getInstance();

            //engine.JoinGame();

            /*while (!engine.getGameState()) ;
            gAI.initAI();    */
            //gAI.work();
            //engine.analyze((object)"I:P4:9,3;1,3;3,2;0,4;8,6;0,8;2,3;3,1:5,3;3,8;2,4;4,8;6,8;8,3;7,1;8,4:8,1;4,3;3,6;1,4;4,7;7,6;9,8;7,2;2,1;6,7#"); ;
            graphics.ApplyChanges();
            base.Initialize();
        }