static void rrrd() { Game gg = new Game( @"000222220 0001111110 0222000001 0222000001 0222000000 1000000000 0000000001 0000022220 1000022220 1000022220 1011000000" ); gg.start(new Point(gg.W / 2, gg.H / 2)); var s = @"** *** ******** * * **XX@@* **XX@* **XX* **** * **X* *X* *** *** ** BBBBB ** * *BBBBB* * * **BBBBB** *BBBBB* * BBBBB ** B *** * * BOB * ** * B *X* ** **** * @** **"; string dl = ""; string[] m = s.Replace("\n", "").Split('\r'); for (int i = 0; i < m.Length; i++) { for (int a = 0; a < m[i].Length; a += 1) { switch (m[i][a]) { case 'O': case ' ': case '_': case '|': dl += "0"; break; case 'B': dl += "2"; break; case 'X': case '@': case '*': dl += "1"; break; } } dl += "\r\n"; } Game g = new Game(dl); g.start(new Point(gg.W / 2, gg.H / 2)); }
public static void runit(string s, int x, int y) { Bitmap b; Game g2; b = new Bitmap(s); g2 = new Game(b); g2.previewH = (int)(Console.WindowHeight / 1.0); g2.previewW = Console.WindowWidth; g2.drawChar += DrawChar; // try { g2.start(new Point(x, y)); // } // catch (Exception re) { // } }