Handling "*" in ex52 lpthw

I was working on adding a “room attempts” functionality. I got a brute force version working. But I am curious about how I could implement a better way to handle the "*" catchall for the laser weapon armory and the escape pod.


    '0132': the_bridge,
    '*': generic_death

Currently, I explicitly pass in the catchall in app.py:

if room.attempts is None:
    next_room = room.go(action)
    if room.attempts == 0:
        next_room = room.go('*')
        next_room = room.go(action)
        room.attempts -= 1

Thank you in advance.

Honestly I think you’d need a fairly major redesign to get around that, so I’d say just keep moving on.