Created
December 4, 2011 20:28
-
-
Save aufi/1431186 to your computer and use it in GitHub Desktop.
coffee pokus coderetreat2011
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 Game | |
| constructor: -> | |
| @points = [] | |
| list_points: -> | |
| sousedi += " "+p[i].x+","+p[i].y for p in @points | |
| alert(sousedi) | |
| class Point | |
| constructor: (x, y, game) -> | |
| @x = x | |
| @y = y | |
| @game = game | |
| game.points.push(this); | |
| count: -> | |
| alert(@x) | |
| g = new Game(); | |
| p = new Point(2,3, g) | |
| #p.count(); | |
| g.list_points() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment