Right now when a player is at the edge of the map (e.g. position 0,0
) they are not supposed to move out of the map. For example below, the player is not given the option to move north, however they can still decide to move north, and if they do.. the game crashes.
TURN : 1
MAP VIEW
* * * *
* * * *
* * * *
* * * *
you are at 0,0
Here are your movement options..
S(South) : unknown
E(East) : unknown
SE(South-East) : unknown
prompt.get({
description : 'Please enter a movement option',
type : 'string',
pattern : customRegex,
message : 'Please choose an appropriate movement option',
require : true,
before : val => val.toUpperCase()