private void initAgents() {
    		agents = new Vector<Agent>();

    		for(int a = 0; a < numAgents; a++) {
    			agents.add(new Agent(this));
    		}

    		for(int a = 0; a < agents.size(); a++) {
    			int x = 0;
    			int y = 0;
    			boolean free = false;
    			while (!free) {
    				x = gen.nextInt(xSize);
    				y = gen.nextInt(ySize);
    				free = (grid[x][y].getAgent() == null);
        		}
        		Agent agent = agents.elementAt(a);
        		agent.setPosition(x,y);
        		grid[x][y].setAgent(agent);
    		}
    }