test_pos = self.get_move_target()
if test_pos is None:
raise GameError('would move out of map')
+ elif self.thing.game.map[test_pos] != '.':
+ raise GameError('would move into illegal territory')
def do(self):
self.thing.position = self.get_move_target()
tui.log_msg("ALL TEXT - send TEXT to all users", 3);
tui.log_msg("QUERY USER TEXT - send TEXT to USER", 3);
tui.log_msg("");
-tui.log_msg("Use arrow keys to move your avatar", 1);
+tui.log_msg("Use arrow keys to move your avatar. You can only move over \".\" map cells.", 1);
tui.log_msg("");
tui.log_msg("Use double quotes for strings that contain whitespace, escape them with \\.", 1);
tui.log_msg("");
-tui.log_msg("To write on the map, hit Return on a single visible ASCII character in the input prompt", 1);
+tui.log_msg("To change the map cell you are standing on, type the desired ASCII character into the prompt and hit Return.", 1);
+tui.log_msg("");
document.addEventListener('keydown', (event) => {
if (chat.input_line === '') {