3 ms·
Less fancy hack here, intercept the prediction function on every punch and force the frog to take the opposite side. const realPunch = punch; punch = function(
by emrtnn 3mo ago
Less fancy hack here, intercept the prediction function on every punch and force the frog to take the opposite side.
const realPunch = punch;
punch = function(myMove) {
oracle.predictNextPunch = function() {
return myMove === 'L' ? 'R' : 'L';
};
realPunch(myMove);
};
- escanor 3mo agobrilliant!