Esempio n. 1
0
        $exits = new Exits();
        list($response->action, $response->data) = $exits->go_to($verb);
        break;
    case __('INVENTORY_VERB'):
        $inventory = new Inventory();
        list($response->action, $response->data) = $inventory->show();
        break;
    case __('LOOK_VERB'):
        $room = new Room();
        list($response->action, $response->data) = $room->look($words);
        break;
    case __('TAKE_VERB'):
        $room = new Room();
        list($response->action, $response->data) = $room->take($words);
        break;
    case __('TALK_VERB'):
        $talk = new Talk();
        list($response->action, $response->data) = $talk->with($words);
        break;
    case __('DROP_VERB'):
        $inventory = new Inventory();
        list($response->action, $response->data) = $inventory->drop($words);
        break;
    default:
        // chat
        savechat(CURRENT_ROOM, $data);
        $response->action = 'chat';
        break;
}
file_put_contents("profiler.txt", memory_get_usage() . ' => ' . (microtime(1) - $time));
print_r(json_encode($response));