public void render() {
		map.render();
		if (pf != null)
			pf.render();
		for (SnakeBody s : bodyParts)
			s.render();
		
		glColor3f(randr, randg, randb);
		glBegin(GL_TRIANGLE_FAN);
		{
			glVertex2d(x, y);
			for (int j = 0; j <= 360; j++) {
				glVertex2f((float) (x + Math.sin(j) * width),
						(float) (y + Math.cos(j) * height));
			}
			glEnd();
		}
		glEnd();

		if (printHeading) {
			glBegin(GL_LINES);
			glVertex2d(x, y);
			glVertex2f((float) (x + Math.cos(Math.toRadians(heading))
					* (width + range)),
					(float) (y - Math.sin(Math.toRadians(heading))
							* (height + range)));
			glEnd();
		}

		if (printRadar) {
			int i;
			int lineAmount = 100; // # of triangles used to draw circle
			// GLfloat radius = 0.8f; //radius
			float twicePi = (float) (2.0f * Math.PI);
			glBegin(GL_LINE_LOOP);
			for (i = 0; i <= lineAmount; i++) {
				glVertex2f(
						(float) (x + ((width + range) * Math.cos(i * twicePi
								/ lineAmount))),
						(float) (y + ((height + range) * Math.sin(i * twicePi
								/ lineAmount))));
			}
			glEnd();
		}

		if (printPieSlices) {
			glColor3f(.2f, .9f, .2f);
			glLineWidth(1);
			glBegin(GL_LINES);
			glVertex2f((float) (x - Math.cos(Math.toRadians(heading - 45))
					* (width + range)),
					(float) (y + Math.sin(Math.toRadians(heading - 45))
							* (height + range)));
			glVertex2f((float) (x + Math.cos(Math.toRadians(heading - 45))
					* (width + range)),
					(float) (y - Math.sin(Math.toRadians(heading - 45))
							* (height + range)));
			glEnd();
			glLineWidth(1);
			glBegin(GL_LINES);
			glVertex2f((float) (x - Math.cos(Math.toRadians(heading + 45))
					* (width + range)),
					(float) (y + Math.sin(Math.toRadians(heading + 45))
							* (height + range)));
			glVertex2f((float) (x + Math.cos(Math.toRadians(heading + 45))
					* (width + range)),
					(float) (y - Math.sin(Math.toRadians(heading + 45))
							* (height + range)));
			glEnd();
		}
		
		if (printWallSensors) {
			for (Vector v : wallsInRange)
			{
				glColor3f(1f, 0f, 1f);
				glBegin(GL_LINES);
				glVertex2d(x, y);
				glVertex2d(v.getX(), v.getY());
				glEnd();
			}
		}
	}