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; }
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); }
public GameRules(GameLogic g, Board b) { board = b; gameLogic = g; }