@Override
		protected AIBundle doInBackground() throws Exception {
			long startTime = System.currentTimeMillis(); //use this instead of a timer thread to know when to stop.
			bundle = new AIBundle(operation);
			switch(operation){
				//Switching on what we want returned.
			case OPERATION_MOVE:
				bundle = getNextMove();
				break;
			case OPERATION_PLACE:
				bundle = getNextPlace();
				break;
			case OPERATION_DESTROY:
				bundle = getNextDestroy();
				break;
			}
			long endTime = System.currentTimeMillis();
			if (endTime - startTime < AI_DELAY && operation != OPERATION_DESTROY){
				System.out.println("["+getDifficultyString()+" "+playerID+"] AI is sleeping for another "+(AI_DELAY-(endTime-startTime))+"ms");
				Thread.sleep(AI_DELAY-(endTime-startTime));
			} else {
				System.out.println("["+getDifficultyString()+" "+playerID+"] AI took "+(endTime - startTime)+"ms to choose a move");
			}
			return bundle;
		}