Created
March 29, 2011 09:52
-
-
Save sebmarkbage/892109 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
| class Point(x, y) extends Something { | |
| move(x, y); | |
| public X = 0, Y = 0; | |
| public move(x, y) { | |
| X = x; | |
| Y = y; | |
| repaint(); | |
| } | |
| } | |
| Point.fromString = function (s) { | |
| return new Point(parse(s)); | |
| } |
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
| class Point { | |
| X: 0, | |
| Y: 0, | |
| static fromString: function (s) { | |
| return new Point(parse(s)); | |
| }, | |
| initialize: function (x, y) { | |
| move(x, y); | |
| }, | |
| move: function (x, y) { | |
| X = x; | |
| Y = y; | |
| repaint(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment