public ArrayList<Integer> playVisual(int frame_height, boolean fog, boolean show_fog, int team) {
		if (agents.size() != pgs.numberOfPlayers()) {
			System.out.println("Not the right number of players. Expected "+pgs.numberOfPlayers()+" but got "+agents.size()+" players");
			return new ArrayList<Integer>();
		}
		pgs.fog = fog;
		
		JFrame window = PhysicalGameStatePanel.newVisualizer(this, frame_height, show_fog, team);
		
		boolean gameover = false;
		cycle = 0;
		long cycle_end = System.currentTimeMillis()+turn_length;
        do{
            if (System.currentTimeMillis() >= cycle_end) {
            	for (int i = 0; i < agents.size(); i++) {
            		// update GS here
            		pgs.setCurrentPlayer(i);
            		gs.update();
            		// ...
            		pgs.setTimeLimit(System.currentTimeMillis()+turn_length);
            		agents.get(i).getAction(gs, turn_length);
            	}

                // simulate:
                gameover = pgs.cycle();
                window.repaint();
                cycle_end += turn_length;
                cycle++;
            } else {
                try {
                    Thread.sleep(1);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }while(!gameover && cycle < max_game_cycles);
        
        int winner = pgs.winner();
        if (winner == -1) {
        	winner = pgs.winnerByScore();
        }
        if (winner != -1) {
        	return pgs.teams.get(winner);
        }
        return new ArrayList<Integer>();
	}