@Override
	public void render(Graphics g) {
		//para efectos de debug, se renderiza una malla.
		int cellSize = 32; //metida harcodeada
		g.setColor(new Color(0, 0.5f, 0, 0.75f));
		for (int i = 0; i < Level.WIDTH; i++) {
			g.drawLine(i * cellSize, 0, i * cellSize, Level.HEIGHT * cellSize);
			if(i <= Level.WIDTH)
				g.drawLine(0, i * cellSize, Level.WIDTH * cellSize, i * cellSize);
		}
		
		// pintando obstaculos
		g.setColor(new Color(0, 0, 1f));
		for (Obstacle obs : level.getObstacles()) {
		    int x = (int) (obs.getX() * cellSize) + 2;
		    int y = (int) (obs.getY() * cellSize) + 2;
		    g.fillRect(x, y, cellSize - 4, cellSize - 4);
		}
		 
		// pintando enemigos
		g.setColor(new Color(1f, 0, 0));
		for (Enemy enemy : level.getEnemies()) {
		    int x = (int) (enemy.getX() * cellSize);
		    int y = (int) (enemy.getY() * cellSize);
		    g.fillOval(x + 2, y + 2, cellSize - 4, cellSize - 4);
		}
		 
		// pintando el jugador
		g.setColor(new Color(0, 1f, 0));
		Player player = level.getPlayer();
		int x = (int) (player.getX() * cellSize);
		int y = (int) (player.getY() * cellSize);
		g.fillOval(x + 2, y + 2, cellSize - 4, cellSize - 4);
		// pintar el cuadro en el nivel
		g.setColor(new Color(0.7f, 0.5f, 0f));
		g.fillRect(x + 10, y + 10, cellSize - 20, cellSize - 20);

	}