public void move() {
        //create a new location for the head, using the direction.
        int x = 0;
        int y = 0;
        switch (getDirection()) {
            case UP:
                x = 0;
                y = -1;
                break;
            case DOWN:
                x = 0;
                y = 1;
                break;
            case LEFT:
                x = -1;
                y = 0;
                break;
            case RIGHT:
                x = 1;
                y = 0;

        }
        body.add(0, new Point(getHead().x + x, getHead().y + y));

        if (getGrowthCounter() > 0) {
            setGrowthCounter(getGrowthCounter() - 1);

        } else {
            body.remove(body.size() - 1);
        }
    }