12 lines
244 B
JavaScript
12 lines
244 B
JavaScript
import {io} from "./io.mjs"
|
|
export class IllegalAction {
|
|
constructor(id, action){
|
|
this.action = action
|
|
this.id = id
|
|
this.sendIllegalAction();
|
|
}
|
|
sendIllegalAction() {
|
|
io.to(this.id).emit('illegalAction', this.action)
|
|
}
|
|
}
|