30 lines
618 B
JavaScript
30 lines
618 B
JavaScript
export function illegalAction(data) {
|
|
let action
|
|
|
|
switch (data) {
|
|
case 1:
|
|
action = "You must be in game to do this."
|
|
break;
|
|
case 20:
|
|
action = "That name is already taken."
|
|
break;
|
|
case 21:
|
|
action = "That name is too long."
|
|
break;
|
|
case 22:
|
|
action = "You are already in a game."
|
|
break;
|
|
case 23:
|
|
action = "Invalid Placement location."
|
|
break;
|
|
case 100:
|
|
action = "Malformed Packet"
|
|
break;
|
|
default:
|
|
action = "Unknown action."
|
|
}
|
|
console.log(`Illegal Action. ${action}`)
|
|
alert(`Illegal Action, ${action}`)
|
|
|
|
}
|