private void Moving() { SnakeStateMachine snake = new SnakeStateMachine(); Console.WriteLine(snake.DirectionNames); while (true) { snake.changeddirection(Console.ReadKey(true)); Console.WriteLine(snake.DirectionNames); } }
public void Start() { snake = new SnakeStateMachine(); pg = new Playground(); Task.Run(() => { moving(); }); while (true) { Thread.Sleep(500); Playgroundworker(); } }