예제 #1
0
 public GameManager(GraphPlayingfield playingfield, HumanPlayer humanPlayer, Agent agentPlayer)
 {
     this.playingfield = playingfield;
     this.humanPlayer  = humanPlayer;
     this.agentPlayer  = agentPlayer;
     humanTurn         = startingPlayer();
 }
예제 #2
0
        protected override void LoadContent()
        {
            spriteBatch    = new SpriteBatch(GraphicsDevice);
            otelloPieceTex = Content.Load <Texture2D>("OtelloTile");
            lineTex        = Content.Load <Texture2D>("1x1px");

            whiteButtonRect = new Rectangle((Window.ClientBounds.Width / 2) - otelloPieceTex.Width, Window.ClientBounds.Height / 2, otelloPieceTex.Width, otelloPieceTex.Height);
            blackButtonRect = new Rectangle(Window.ClientBounds.Width / 2, Window.ClientBounds.Height / 2, otelloPieceTex.Width, otelloPieceTex.Height);

            playingField = new GraphPlayingfield(otelloPieceTex);
            playingField.PlaceStartPositios();

            lineTex    = new Texture2D(graphics.GraphicsDevice, 1, 1);
            lineDrawer = new LineDrawer(lineTex);

            agentMinMax = new Agent(playingField);
            hPlayer     = new HumanPlayer(playingField);

            gameManager = new GameManager(playingField, hPlayer, agentMinMax);
        }
예제 #3
0
 public HumanPlayer(GraphPlayingfield playingField)
 {
     this.playingField = playingField;
 }
예제 #4
0
        //private NodeOtelloPiece[] placeableNodes;


        public Agent(GraphPlayingfield playingField)
        {
            this.playingField = playingField;
            maxEval           = -1000;
            minEval           = 1000;
        }