public GameWindow() { InitializeComponent(); Game = new Game(gameWidth, gameHeight); var textLevel = new[] { "############################################################", "# ## #", "# ## #", "# ## #", "# ## #", "# ## #", "# ## #", "# ML T ## ML T #", "# #### ###### #### ##### #", "# ###### ###### #", "# ############# T ############# T #", "############################################################" // " ", // "##############################" }; Game.InitializePlayer(200, 200, blockSize / 2, blockSize); // Game.InitializePlayer(0, 0, blockSize, blockSize); Game.AddLevel(Level.GenerateLevelFromStringArray(textLevel, gameWidth, blockSize, Game)); Drawer = new GameDrawer(Game); }
private static void init() { gameIsRuning = true; size = initInt("Map Size"); numOfFoxes = initInt("Number Of Foxes"); map = new Map(size, numOfFoxes); GameDrawer.setMap(map); position = new Item(0, 0); }
public Form1() { InitializeComponent(); try { Cursor = new Cursor(Path.Combine(AppDomain.CurrentDomain.BaseDirectory !, @"Sprites\cursor.ico")); _menuDrawer = new MenuDrawer(); _gameDrawer = new GameDrawer(); _resultScreenDrawer = new ResultScreenDrawer(); _levelRedactorDrawer = new LevelRedactorDrawer(); KeyDown += KeyDownProcessor; KeyUp += KeyUpProcessor; MouseWheel += MouseWheelProcessor; InitEngine(); } catch (Exception e) { Console.WriteLine(e.Data); Console.WriteLine(e.Message); Console.WriteLine(e.Source); Console.WriteLine(e.StackTrace); } }
public GameDrawerTests() { _writer = new StringWriter(); _gameDrawer = new GameDrawer(new TextWriterConsole(_writer)); }
// Draw our board to whatever device our GameDrawer object wants to send it to public void DrawBoardToOutput() { GameDrawer.DrawBoardToOutput(this); }
private static void drawMap() { GameDrawer.drawGameFrame(position); // Console.WriteLine(position.getX()+" "+position.getY()); }