public Snake(Keys[] keys, Color color, Game game, Player player) { // Params this.color = color; this.keys = keys; this.game = game; this.player = player; // Defaults this.speed = Game.snakeDefaultSpeed; this.turningSpeed = Game.snakeDefaultTurningSpeed; this.size = Game.snakeDefaultSize; this.isDrawing = true; this.inverse = 1; this.crashed = false; this.isNotDrowingUntil = DateTime.Now; // Pen RecreateTrailingPen(); // Poweups powerups = new List<Powerup>(); penGreen = new Pen(new SolidBrush(Color.PaleGreen), 4); penRed = new Pen(new SolidBrush(Color.PaleVioletRed), 4); }
public Player(Color color, Keys[] keys, Game game) { this.color = color; this.keys = keys; this.game = game; this.snake = createSnake(); }
public Collisions(int x, int y, Game game) { this.game = game; field = new int[x, y]; pointsHistory = new Dictionary<int, Dictionary<Point, int>>(); }