.. Obito definitely win's in my opinion ..
.. I mean, his Illusory Magic in conjunction with his Spirituality Transcendenting Abilities' in the likes of The Authority Of The Gods' ( .. AKA KĀMUI .. ), definitely takes it in my opinion, tbh.
.. I'd like to add that him possessing substantially superior portrayal, and hype, to Code, in every way, shape, and form — also — gives him a definitive advantage in this battle simulation, like him being praised by the likes of Minato — who believed he was so perceptive enough to see through all of his moves — as well as, outplaying him multiple times in the simulation — prior to Minato trapping him with the Flying Thunder God Level Two, that he implicitly had no intelligence on.