Created
August 13, 2018 17:48
-
-
Save MikeShi42/84db797557558f7875f77f52f96bbb11 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
setup() { | |
if (!this.remotePlayer) { | |
this.inputManager.on("move", this.move.bind(this)); | |
this.inputManager.on("restart", this.restart.bind(this)); | |
this.inputManager.on("keepPlaying", this.keepPlaying.bind(this)); | |
} | |
this.grid = new Grid(this.size); | |
this.score = 0; | |
this.over = false; | |
this.won = false; | |
this.keepPlaying = false; | |
if (!this.remotePlayer) { | |
// Add the initial tiles | |
this.addStartTiles(); | |
} | |
// Update the actuator | |
this.actuate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment