for (const thing_id in game.things) {
let t = game.things[thing_id];
map_lines[t[0]][t[1]] = '@';
if (game.player_id == thing_id) {
for (const thing_id in game.things) {
let t = game.things[thing_id];
map_lines[t[0]][t[1]] = '@';
if (game.player_id == thing_id) {
if (tui.mode == 'study' || tui.mode == 'annotate') {
map_lines[explorer.position[0]][explorer.position[1]] = '?';
center_pos = explorer.position;
if (tui.mode == 'study' || tui.mode == 'annotate') {
map_lines[explorer.position[0]][explorer.position[1]] = '?';
center_pos = explorer.position;
tui.log_msg("/login USER - register as USER");
tui.log_msg("/msg USER TEXT - send TEXT to USER");
tui.log_msg("/help - show this help");
tui.log_msg("/login USER - register as USER");
tui.log_msg("/msg USER TEXT - send TEXT to USER");
tui.log_msg("/help - show this help");
tui.log_msg("");
tui.log_msg("play mode commands:");
tui.log_msg("w, a, s, d - move avatar");
tui.log_msg("");
tui.log_msg("play mode commands:");
tui.log_msg("w, a, s, d - move avatar");
websocket.onmessage = function (event) {
let tokens = parser.tokenize(event.data)[0];
if (tokens[0] === 'TURN') {
websocket.onmessage = function (event) {
let tokens = parser.tokenize(event.data)[0];
if (tokens[0] === 'TURN') {
let [tokens, token_starts] = parser.tokenize(tui.input_line);
if (tokens.length > 0 && tokens[0].length > 0) {
if (tokens[0][0] == '/') {
let [tokens, token_starts] = parser.tokenize(tui.input_line);
if (tokens.length > 0 && tokens[0].length > 0) {
if (tokens[0][0] == '/') {