@Override
	public Edge makeMove(Edge lastEdge, GameState gameState, Player player, Game game) {
                //lastEdge becauso of user thinking
                lastEdge = null;                
		
                //Get time
		//System.out.format(Values.COMPUTER_THINKING + "\n", getName());
		long start = System.currentTimeMillis();
		String moveRequestTerm = buildGoalTerm(gameState, player, mDepth);
		
		String response;
		
		try {
			response = mRunner.execute(moveRequestTerm, 
					mPrologMinimaxSourceFile.getAbsolutePath());
		} catch (PrologException e) {
			System.err.println("Error running prolog code: " + e);
			System.exit(1);
			throw new AssertionError(
					"this won't be thrown but compiler complains without it");
		}
		Matcher matcher = MOVE_PATTERN.matcher(response);
		
		//validate the response
		if(!matcher.find()) {
			System.err.println("ERROR: Cannot make move, malformed response " +
					"from prolog interpreter:");
			if(StringUtils.isEmpty(response))
				System.err.println("(empty string)");
			else
				System.err.println(response);
			System.exit(1);
		}
		
		Edge move = Edge.obtain(
				Integer.parseInt(matcher.group(2)), 
				Integer.parseInt(matcher.group(3)),
				matcher.group(4).equals(ATOM_RIGHT) ? 
						Direction.RIGHT : Direction.BELOW);
		
		// Fail hard if prolog code tries to make an existing move.
		checkState(!gameState.containsEdge(move), 
				"Prolog code made existing move");
		
		//System.out.format("  Time taken: %s seconds.\n",
		//		(System.currentTimeMillis() - start) / 1000f);
		return move;
	}