private void GameForm_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyData) { case Keys.Up: game.MoveUp(); break; case Keys.Down: game.MoveDown(); break; case Keys.Right: game.MoveRight(); break; case Keys.Left: game.MoveLeft(); break; case Keys.Space: game.SpawnBottle(); break; } }
static void Main(string[] args) { Point player, shkaf; Model.Cell[,] map; ParseChar("C:\\Users\\Sergey\\Desktop\\test1.txt", out player, out shkaf, out map); var game = new ModelWithLogic(map, player, shkaf, 5); game.SpawnBottle(); string res = game.Start(); }