static synchronized void Leader(int agentId, int agentType)
		{	
			int[][] actualGrid = AgentNetworkController.getActualGrid();
			int i, j, val, x, y;
						
			int[] committedList;
			ArrayList<int[]> committedPositionList = new ArrayList<int[]>();
			
			Random random = new Random(System.nanoTime());
			
			for(i=0;i<AgentNetworkController.getSudokuSize();i++)
			{
				for(j=0;j<AgentNetworkController.getSudokuSize();j++)
				{
					if(controller.getCellState(i, j) == GameController.committedByTesterByRows || controller.getCellState(i, j) == GameController.committedByTesterByColumns || 
					   controller.getCellState(i, j) == GameController.committedByTesterBySquares || controller.getCellState(i, j) == GameController.committedByTesterByUser)
					{
						committedList = new int[2];
						committedList[0] = i;
						committedList[1] = j;
						committedPositionList.add(committedList);
					}
				}
			}
			
			if(!committedPositionList.isEmpty())
			{
				val = random.nextInt(committedPositionList.size());
				x = committedPositionList.get(val)[0];
				y = committedPositionList.get(val)[1];
				
				boolean correct = checkPosition(x, y, actualGrid[x][y]);
				
				if(correct) {
					SendMessage("accepted#" + agentId + "," + agentType + "," + x + "," + y);
				}
				else {
					SendMessage("rejected#" + agentId + "," + agentType + "," + x + "," + y);
				}
				
			}
			else
			{
				try {		
					Thread.sleep(2500);			//Donam temps a que s'actualitzi el grid
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		}