private void DrawApple(Apple apple) { try { Invoke( new Action(() => { _board.FillEllipse(Brushes.Red, apple.Position.ToRectangle()); } )); } catch (Exception) { } }
public Game() { Player = new Player(MapCenter); Apple = new Apple(GetRandom()); Direction = Vector2.Right; }