src/VirusSpreadSimulator.java
/*
	 * While update() changes the information in the program, render() makes the changes on the objects in the window.
	 */
While update() changes the information in the program, render() makes the changes on the objects in the window.
While update () changes the information in the program render () makes the changes on the objects in the window .
private void render() {
		BufferStrategy bs = this.getBufferStrategy();
		if(bs == null) {
			this.createBufferStrategy(3);
			return;
		}
		Graphics g = bs.getDrawGraphics();
		if(runState == STATE.Run) {
			drawBackground(g);
			city.setWalls(getWidth(), getHeight());
			city.draw(g);
		}
		else if(runState == STATE.Menu || runState == STATE.End || runState == STATE.Help || runState == STATE.Set) {
			drawBackground(g);
			menu.render(g);
		}
		g.dispose();
		bs.show();
	}
private void render ( ) { BufferStrategy bs = this . getBufferStrategy ( ) ; if ( bs == null ) { this . createBufferStrategy ( 3 ) ; return ; } Graphics g = bs . getDrawGraphics ( ) ; if ( runState == STATE . Run ) { drawBackground ( g ) ; city . setWalls ( getWidth ( ) , getHeight ( ) ) ; city . draw ( g ) ; } else if ( runState == STATE . Menu || runState == STATE . End || runState == STATE . Help || runState == STATE . Set ) { drawBackground ( g ) ; menu . render ( g ) ; } g . dispose ( ) ; bs . show ( ) ; }
While update() changes the information in the program, render() makes the changes on the objects in the window.
While update () changes the information in the program render () makes the changes on the objects in the window .