MultiplayerMinesweeper/client/scripts/illegalaction.js

30 lines
626 B
JavaScript
Raw Permalink Normal View History

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"
break;
default:
action = "Unknown action."
}
console.log(`Illegal Action. ${action}`)
alert(`Illegal Action, ${action}`)
}