12 lines
274 B
JavaScript
12 lines
274 B
JavaScript
|
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);
|
||
|
}
|
||
|
}
|