Created
April 8, 2013 15:49
-
-
Save ynonp/5337867 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
package bp.logic; | |
class BPResult { | |
int bulls; | |
int cows; | |
bool is_winner() { ... } | |
BPResult( int bulls, int cows) {} | |
} |
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
(function(global) { | |
global.bp.logic.BPResult = function( bulls, cows ) { | |
var self = this; | |
self.bulls = bulls; | |
self.cows = cows; | |
self.is_winner = function() { | |
return self.bulls === 4; | |
}; | |
}; | |
}(this)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment