MultiplayerMinesweeper/dist/server/illegalAction.js

12 lines
274 B
JavaScript
Raw Normal View History

import { io } from "./io.js";
export class IllegalAction {
constructor(id, action) {
this.action = action;
this.id = id;
this.sendIllegalAction();
}
sendIllegalAction() {
io.to(this.id).emit('illegalAction', this.action);
}
}