public void checkCollision() {
		if (snake.getPosition().equals(food.getPosition())) {
			snake.tail.add(new Point());
			food.reset();
		}
		for (int i = 0; i < snake.tail.size() - 1; i++) {
			if (snake.getPosition().equals(snake.tail.get(i))) {
				gameOver = true;

			}
		}
		if (snake.getPosition().getX() < 0
				|| snake.getPosition().getX() > this.getWidth() - 10
				|| snake.getPosition().getY() < 0
				|| snake.getPosition().getY() > this.getHeight() - 10) {
			gameOver = true;
		}
	}