Created
May 15, 2010 13:21
-
-
Save jankeesvw/402189 to your computer and use it in GitHub Desktop.
This file contains 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
private function getWinner():String { | |
var to:String = String(_battleData.strategy_to[_currentVideoNumber]).charAt(0); | |
var from:String = String(_battleData.strategy_from[_currentVideoNumber]).charAt(0); | |
var result:String = ""; | |
if(from == "r") from = "l"; | |
if(from == "l") from = "r"; | |
if(_currentVideoNumber + 1 < 4) { | |
// 1 2 en 3 | |
if(to == from) { | |
result = "to"; | |
} else { | |
result = "from"; | |
} | |
} else { | |
// 4 5 en 6 | |
if(to == from) { | |
result = "from"; | |
} else { | |
result = "to"; | |
} | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment