@Override
	public void reset() {
		turns = 0;
		for (Agent agent : Lagents)
			agent.reset();
		e = new Square[gameSize][gameSize]; // creation of environment array
		totalC = 0;
		for (int i = 0; i < e.length; ++i)
			for (int j = 0; j < e[0].length; ++j) {
				e[i][j] = new Square();
				e[i][j].available = true;
				// if (i>0 && i<gameSize-1 && j>0 && j<gameSize-1) {
				e[i][j].Color = r.nextInt(3) > 0;
				if (e[i][j].Color == true)
					totalC++;
				// }
			}
		aStats = new Astats[Lagents.length]; // create agent statistics at each
												// index for each agent
		for (int i = 0; i < aStats.length; ++i)
			aStats[i] = new Astats();
		for (int i = 0; i < Lagents.length; i++) {
			int x = r.nextInt(gameSize);
			int y = r.nextInt(gameSize);
			while (e[x][y].agent != -1 || !e[x][y].available
					|| (x + y) % 2 == 0) {
				x = r.nextInt(gameSize);
				y = r.nextInt(gameSize);
			}
			setAgentLocation(i, x, y);
			aStats[i].x0 = x;
			aStats[i].y0 = y;
		}
		fullC = totalC;
		m_moveCounter = 0.0;
		dCounter = 0.0;
	}