public void render(Graphics g) {
//		for (int i=mapRenderIndexX;i<mapRenderIndexX + screenTileWidth;i++) {
//			for (int k=mapRenderIndexY;k<mapRenderIndexY + screenTileHeight;k++) {
//				try {
//					ArrayList<Tile> jimmy = tiles.get(i);
//					jimmy.get(k).render(g);
//				} catch(Exception e) {}
//			}
//		}
		
		//renders all the tiles on your screen (otherwise, you get EXTREMELY slow FPS)
		for (ArrayList<Tile> tileList : tiles) {
			for (Tile tile : tileList) {
				if (tile.mapX > player.x - SCREENXOFFSET - Tile.SIZE && tile.mapX < player.x + SCREENXOFFSET && tile.mapY > player.y - SCREENYOFFSET - Tile.SIZE && tile.mapY < player.y + SCREENYOFFSET) {
					tile.render(g);
				}
			}
		}
		
		//the tile your mouse is over
		if (selectedTile != null) {   
			g.setColor(Color.BLACK);
			g.drawRect(mapXOffset + selectedTile.mapX, mapYOffset + selectedTile.mapY, Tile.SIZE, Tile.SIZE);
		}
		
		//If you clicked on an unowned tile, this shows up for you to buy it
		if (selectedBuyTile != null) {
			if (mouseOverSBR) {
				g.setColor(Color.ORANGE);
			} else {
				g.setColor(new Color(250, 125, 0));
			}
			g.fillRect(selectedBuyRect.x + mapXOffset, selectedBuyRect.y + mapYOffset, selectedBuyRect.width, selectedBuyRect.height);
			g.setColor(Color.BLACK);
			g.drawRect(selectedBuyRect.x + mapXOffset, selectedBuyRect.y + mapYOffset, selectedBuyRect.width, selectedBuyRect.height);
			g.setFont(new Font("Arial", Font.BOLD, 15));
			g.drawString("Buy land: 100 Gold", selectedBuyRect.x + 10 + mapXOffset, selectedBuyRect.y + 20 + mapYOffset);
			g.drawRect(mapXOffset + selectedBuyTile.mapX, mapYOffset + selectedBuyTile.mapY, Tile.SIZE, Tile.SIZE);
		}
	}