2022-06-20 02:39:31 +00:00
|
|
|
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:
|
2023-04-03 19:26:24 +00:00
|
|
|
action = "Malformed Socket Request"
|
2022-06-20 02:39:31 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
action = "Unknown action."
|
|
|
|
}
|
|
|
|
console.log(`Illegal Action. ${action}`)
|
|
|
|
alert(`Illegal Action, ${action}`)
|
|
|
|
|
|
|
|
}
|