/* * */ public GameLogic(SimpleGraphicsForm simpleGraphics) { this.simpleGraphics = simpleGraphics; filledGameSquares = new int[11, 21]; filledNextSquares = new int[7, 7]; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); SimpleGraphicsForm simpleGraphics = new SimpleGraphicsForm(); GameLogic gameLogic = new GameLogic(simpleGraphics); simpleGraphics.GameSquareFilled += gameLogic.GameSquareFilled; simpleGraphics.NextSquareFilled += gameLogic.NextSquareFilled; simpleGraphics.KeyDownEvent += gameLogic.KeyDownEvent; gameLogic.StartNewGame(); Application.Run(simpleGraphics); }