public void render()
	{
		Graphics g = screen.getGraphics();

		g.setColor(Color.black);
		g.fillRect(0, 0, pixel.width, pixel.height);
		
		//show the black screen with countdown
		if(swappingNow)
		{
			int secondsLeft = (int) ((timerPos / (1000/(tickTime*computerSpeed)) + 1));
			String secString = " seconds";
			if(secondsLeft == 1)
				secString = " second";
			String str = secondsLeft + secString;
			
			g.setColor(Color.black);
			g.fillRect(0, 0, pixel.width, pixel.height);
			
			Font fontSave = g.getFont();
			Font font = new Font("Verdana", Font.BOLD, 96);
			FontMetrics fm = g.getFontMetrics(font);
			
			int xText = pixel.width/2;
			int yText = pixel.height/2;
			
			xText += -(fm.stringWidth(str)/2) + 2;
	        yText += fm.getAscent()/2;
	        
	        g.setColor(Color.white);
			g.setFont(font);
			g.drawString(str, xText, yText);
			g.setFont(fontSave);
		}
		else		//render normally
		{
			game.render(g);			//render the game
		}
		
		g = getGraphics();

		g.drawImage(screen, 0, 0, size.width, size.height, 0, 0, pixel.width, pixel.height, null);
		g.dispose();		//throw it away to avoid lag from too many graphics objects
	}