void Init() { for (int i = 0; i < PLAYER_COUNT; i++) { consoles[i] = new Nescafe.Console(); consoles[i].LoadCartridge(Path.Combine(@"super-mario-bros.nes")); frame[i] = new Bitmap(256, 240, System.Drawing.Imaging.PixelFormat.Format8bppIndexed); } consoles[(int)players.PLAYER].DrawAction = Draw_Player; consoles[(int)players.AI].DrawAction = Draw_AI; this.KeyDown += MainWindow_KeyDown; this.KeyUp += MainWindow_KeyUp; this.Closed += MainWindow_Closed; }