public void growBody(int length) {
        for (int i = 0; i < length; i++) {
            int x = body.get(0)[0];
            int y = body.get(0)[1];
            if (direction.getDirection() == Direction.D_R) {
                body.add(0, makeBodyInstance(x + 1, y, SnakeD.T_HEAD_FACERIGHT));
            } else if (direction.getDirection() == Direction.D_D) {
                body.add(0, makeBodyInstance(x, y + 1, SnakeD.T_HEAD_FACEDOWN));
            } else if (direction.getDirection() == Direction.D_L) {
                body.add(0, makeBodyInstance(x - 1, y, SnakeD.T_HEAD_FACELEFT));
            } else if (direction.getDirection() == Direction.D_U) {
                body.add(0, makeBodyInstance(x, y - 1, SnakeD.T_HEAD_FACEUP));
            }
            body.get(1)[2] = SnakeD.getNeckType(passDirection.getDirection(), direction.getDirection());
            changeDirection(this.getDirection());
            xHead = body.get(0)[0];
            yHead = body.get(0)[1];
            if (xHead<0){
                xHead=Board.maxX;
                body.get(0)[0]=xHead;
            }
            if (xHead>Board.maxX){
                xHead=0;
                body.get(0)[0]=xHead;
            }
            if (yHead<0){
                yHead=Board.maxY;
                body.get(0)[1]=yHead;
            }
            if (yHead>Board.maxY){
                yHead=0;
                body.get(0)[1]=yHead;
            }
        }
        coor.updateCoor(this);
    }