Skip to content

Commit

Permalink
refactor: deprecate msg
Browse files Browse the repository at this point in the history
  • Loading branch information
andretchen0 committed Aug 11, 2023
1 parent 65b99a6 commit 20fe780
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ export default class Game {
turnThrottle: boolean;
turn: number;
Phaser: Phaser;
msg: any; // type this properly
triggers: Record<string, RegExp>;
signals: any;

Expand Down Expand Up @@ -200,8 +199,6 @@ export default class Game {
render: this.phaserRender.bind(this),
});

this.msg = strings;

/* Regex Test for triggers */
this.triggers = {
onStepIn: /\bonStepIn\b/,
Expand Down Expand Up @@ -350,6 +347,14 @@ export default class Game {
return this.grid.hexAt(x, y);
}

/**
* @returns the "strings" object of (mainly) constant strings
* @deprecated Import and use data/strings.ts
*/
get msg() {
return strings;
}

get activePlayer() {
if (this.multiplayer) {
if (this.players && this.match instanceof MatchI && this.match.userTurn) {
Expand Down

0 comments on commit 20fe780

Please sign in to comment.