Skip to content

Instantly share code, notes, and snippets.

@MikeShi42
Created August 13, 2018 17:44
Show Gist options
  • Save MikeShi42/de72742f9894432853549541b463225a to your computer and use it in GitHub Desktop.
Save MikeShi42/de72742f9894432853549541b463225a to your computer and use it in GitHub Desktop.
class HTMLActuator {
constructor(remotePlayer) {
if (remotePlayer) {
this.tileContainer = document.querySelector("#player-two .tile-container");
this.messageContainer = document.querySelector("#player-two .game-message");
} else {
this.tileContainer = document.querySelector("#player-one .tile-container");
this.messageContainer = document.querySelector("#player-one .game-message");
}
this.scoreContainer = document.querySelector(".score-container");
this.bestContainer = document.querySelector(".best-container");
this.score = 0;
this.remotePlayer = remotePlayer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment