Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vck3000 committed Feb 11, 2024
1 parent e6ea0ac commit 277cb42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
6 changes: 2 additions & 4 deletions src/gameplay/avalon/roles/assassin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Game from '../../game';
import Phase from '../phases/phases';

class Assassin implements Role {
// @ts-ignore
room: Game;
// TODO pretty ugly...
static role = 'Assassin';
Expand All @@ -19,7 +18,6 @@ class Assassin implements Role {
playerShot = '';
playerShot2 = '';

// @ts-ignore
constructor(room: Game) {
this.room = room;
}
Expand Down Expand Up @@ -53,7 +51,7 @@ class Assassin implements Role {
// Get the number of successes:
let numOfSuccesses = 0;

for (var i = 0; i < this.room.missionHistory.length; i++) {
for (let i = 0; i < this.room.missionHistory.length; i++) {
if (this.room.missionHistory[i] === 'succeeded') {
numOfSuccesses++;
}
Expand All @@ -65,7 +63,7 @@ class Assassin implements Role {
let tristExists = false;
let isoExists = false;

for (var i = 0; i < this.room.playersInGame.length; i++) {
for (let i = 0; i < this.room.playersInGame.length; i++) {
if (this.room.playersInGame[i].role === 'Merlin') {
merlinExists = true;
}
Expand Down
8 changes: 0 additions & 8 deletions src/gameplay/avalon/roles/merlin.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ class Merlin {

this.description = 'Knows the identity of the spies.';
this.orderPriorityInOptions = 100;

this.test = function () {
// The following lines running successfully shows that each role file can access
// the variables and functions from the game room!
console.log(
`HII from merlin. The number of sockets is: ${this.thisRoom.allSockets.length}`,
);
};
}

see() {
Expand Down

0 comments on commit 277cb42

Please sign in to comment.