public void createFood(int size) {
        if (size >= maxX || size >= maxY) {
            return;
        }
        boolean validPos = false;
        while (!validPos) {
            food = new Food(size, new Vector2d((int)(Math.random()*(maxX-size)), (int)(Math.random()*(maxY-size))));
            for (Snake snake : activeSnakeList) {
                validPos = !food.isColliding(snake.getHeadPos());
                if (!validPos) break;
            }
            if (!validPos && size > 1) {
                size -= 1;
            }
        }
    }