Last active
October 10, 2020 11:46
-
-
Save MCarlomagno/e9ad30df0b53b2ca1fba6c52045c85bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getState = function (index) { | |
var me = mk.game.fighters[index] | |
// 0 === false and 1 === true in js conditionals | |
var opponent = index ? mk.game.fighters[0] : mk.game.fighters[1]; | |
var myLife = me._life; | |
var opponentLife = opponent._life; | |
var myPosition = me._position; | |
var opponentPosition = opponent._position; | |
return { myLife, opponentLife, myPosition, opponentPosition}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment