Example #1
0
 public AI(GameRules gr, Board b, GameLogic g)
 {
     InitTimer();
     board = b;
     tileClicked = new int[2];
     aiPressedTile = new int[2];
     currentCheckTilesToChange = new int[8, 8];
     listOfCurrentCheckTilesToChange = new List<int[,]>();
     coordinates = new List<int[]>();
     score = 0;
     gameRules = gr;
     gameLogic = g;
 }
Example #2
0
        static void Main()
        {
            Board b = new Board();
            SaveBoard s = new SaveBoard();
            GameLogic g = new GameLogic(b, s);
            GameRules gr = new GameRules(g, b);
            View v = new View(gr, b, g);
            AI ai = new AI(gr, b,g);

            g.onSwitcherChange += ai.switcherChanged;
            s.onBoardChange += g.boardArrayChanged;
            s.onBoardChange += v.boardArrayChanged;
            g.onScoreChange += v.scoreChanged;
            g.onGameOverChange += v.gameOverChanged;
            g.onTurnChange += gr.playerTurnChanged;
            g.onTurnChange += v.turnChanged;

            Application.EnableVisualStyles();
            Application.Run(v);
        }
Example #3
0
 public GameRules(GameLogic g, Board b)
 {
     board = b;
     gameLogic = g;
 }