public void run() {

		snake = new Snake();
		food = new Food();
		food.setFood(food);
		App.gui.setFood(food);	
		App.gui.setSnake(snake);

		snake.getList().add(new Rectangle(snake.getSnakeX(), snake.getSnakeY(), 10, 10));

		long startTime = System.currentTimeMillis();
		long currentTime = 0;

		//game loop
		while(snakeGame.started) {

			if(snakeGame.isPause()==false) {

				//inputhandling and collisiondetecion for walls
				collisionWall();

				//place food if it's not placed
				placeFood();

				//refresh max score left
				if(snakeGame.getMaxScoreLeft()>0) {
					snakeGame.setMaxScoreLeft(snakeGame.getMaxScoreLeft()-1);
				}

				//snake collided with food?
				collisionFood();

				//snake collided with itself?
				collisionSnake();

				//draw snake correct -> add new head and remove last body-part
				snake.getList().add(new Rectangle(snake.getSnakeX(), snake.getSnakeY(), 10, 10));
				snake.getList().remove(0);

				//time-info
				currentTime = System.currentTimeMillis();
				if(currentTime - startTime >= 901) {	
					if(snakeGame.getSeconds()<59) {
						snakeGame.setSeconds(snakeGame.getSeconds()+1);
					}else if(snakeGame.getSeconds()>=59) {
						snakeGame.setSeconds(0);
						snakeGame.setMinutes(snakeGame.getMinutes()+1);
					}	
					startTime += currentTime - startTime + 100;
				}
			}

			GUI.f1.repaint();


			try {
				Thread.sleep(snakeGame.getDifficultyLevel_thread());
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}