public Food(Game game) { Game = game; var random = new Random(); X = random.Next(1 , Game.Width); Y = random.Next(1, Game.Height); Console.SetCursorPosition(X, Y); Console.Write("O"); }
static void Main(string[] args) { var game = new Game(); while(true) { game.Init(); game.Play(); } }
public Worm(Game game) { Game = game; Direction = "up"; for (var i = 0; i < 5; i++) { WormArray.Add(new Point(15, 15 + i)); } PrintWorm(); }