Skip to content

Instantly share code, notes, and snippets.

@MikeShi42
Created August 13, 2018 17:38
Show Gist options
  • Save MikeShi42/4d64fe461701e665be95f0d00da37f89 to your computer and use it in GitHub Desktop.
Save MikeShi42/4d64fe461701e665be95f0d00da37f89 to your computer and use it in GitHub Desktop.
constructor(socket, remotePlayer, size, InputManager, Actuator, StorageManager) {
this.size = size; // Size of the grid
this.inputManager = new InputManager();
this.storageManager = new StorageManager;
// Change Actuator to take in remotePlayer as an argument!
this.actuator = new Actuator(remotePlayer);
this.startTiles = 2;
...
this.inputManager.on("keepPlaying", this.keepPlaying.bind(this));
// Add these two lines
this.remotePlayer = remotePlayer;
this.socket = socket;
this.setup();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment