public Move move(boolean[] foodpresent, int[] neighbors, int foodleft, int energyleft) {
		MoveInfo moveData = new MoveInfo(foodpresent, neighbors, foodleft, energyleft, lastMove);
		
		preMoveTrack(moveData);

		Move move; // placeholder for return value

		move = reproduce(moveData);
		
		if (move == null) {
			move = makeMove(moveData);
		}
	
		if (move == null) {
			move = new Move(STAYPUT);
		}
		
		if (move.type() < 5 && move.type() > 0) {
			if (neighbors[move.type()] != -1) {
				move = new Move(STAYPUT);
			}
		}
		
		if(move.type() == REPRODUCE && move.childpos() > 0 &&  neighbors[move.childpos()] != -1) {
			move = new Move(STAYPUT);
		}

		if (move.type() == 0) {
			turnsSinceLastMove++;
		} else {
			turnsSinceLastMove = 0;
		}
		postMoveTrack(move, moveData);
		
		lastMove = move.type();
		return move;
	}