Toolkit kit = Toolkit.getDefaultToolkit();
icon = kit.createImage(url);
}
public void init() {
key = new Keyboard();
snake = new SnakeCharacter(WIDTH, HEIGHT, screen, WIDTH / 2, HEIGHT / 2, key, speed);
bg = new Background("/snakebg.png", WIDTH, HEIGHT, screen);
count = 0;
score = 0;