public Game(int width, int length, Action <int> die, Action <Bitmap> graphics) { field = new Field(width, length, SkinsSnake.Rand()); StartLength = length; field.Die += DieSnake; field.Eat += Eat; Death = die; Graphics = graphics; this.graphics = new GraphicsGame(field, Graphics); }
public void Reset() { Stop(); graphics.StopRotate(); graphics.StopMove(); field.Restart(StartLength); field.NewSnakeSkin(SkinsSnake.Rand()); Delayed = 0; CountMoves = 0; historyMoves.Clear(); ChangeLength(SnakeLength); }