[mdlug] Next Meeting, October 9 in person and virtual

Gib gibmaxn at gmail.com
Sun Oct 3 17:43:36 EDT 2021


I've been playing with a python game I created.I call it Haunted.
You can see the source in the bottom of this email.
I have all kinds of problems with it.
 Next Meeting, October 9
We will have in person and virtual meeting options.

We are open to suggestions for our next meeting. Are you doing anything
interesting that you could share with the group? It doesn’t need to be a
polished presentation. Would you like to know more about a program, a
service, or a device?  Let us know what you’d enjoy.
<https://mdlug.org/suggestion-box/>

The meeting will take place at https://meet.jit.si/mdlugmeeting and/or The
Westland Library <http://www.westlandlibrary.org/about/directions> at 12:00
noon, and the presentation will start at 1:00.  We’ll start with an open
discussion and we’ll take on any questions.  If you attend in person,
please bring any devices that need assistance.


Source code for the game Haunted. Note: just getting started. Anyone want
to talk about it?

#Haunted Game
#common variables
global aliveflag
global nextroom
aliveflag = "true" # Is the player alive? true = alive, false = dead
def nextroom (): #which room to go to next
    print ("nextroom ready")
    return
def roomredwitch ():
    global aliveflag
    print ("roomredwitch")
    print ("The Red Witch killed you")
    aliveflag = "false"
    print ("bottom of roomredwitch", aliveflag)
    return
def roomentry ():
    print ("roomentry")
    print ("You are in a main entry room of a large mansion with")
    print ("thick carpet on the floor")
    print ("and three openings. To the west is a entryway to a dining
room.")
    print ("To the north is a room with a green light. To the east is a
dark room")
    print ("enter e w n s to move east west north south")
    global nextroom
#    nextmove = input ("Enter next move")
    while aliveflag == "true":
        print ("You are in roomentry")
        nextmove = input ("Enter next move")
        if nextmove == "e":
            print ("e")
            nextroom = roombat
        elif nextmove == "w":
            print ("w")
            roomdining()
        elif nextmove == "n":
            print ("n")
            roomwerewolf()
        elif nextmove == "s":
            print ("s")
            roommummy()
            print ("Alive flag", aliveflag)
        nextroom ()
        break
    return
def roomempty ():
    print ("roomempty")
    print ("This room is empty. There is noting to do.")
    print ("Your are alive.")
    aliveflag = "true"
    return
def roomgoblin ():
    global aliveflag
    print ("roomgoblin")
    print("a green goblin has killed you.")
    aliveflag = "false"
    return
#
def roombat ():
    global aliveflag
    print ("roombat")
    print ("You see a bat. It bites you. You are a vampire.")
    aliveflag = "false"
    return
def roomdining ():
    global aliveflag
    print ("roomdining")
    print ("You are in the dining room. There is a large, long table")
    print ("Written on the wall in blood Do NOT go in the sun room")
    print ("To the East is the living room")
    print ("You can smell something cooking in the West")
    print ("On the North is a closet door")
    aliveflag = "true"
#    nextmove = input ("Enter next move")
    while aliveflag == "true":
        print ("The dining room has a long fancy urn")
        nextmove = input ("Enter next move")
        if nextmove == "e":
            print ("e")
            nextroom = roomliving
        elif nextmove == "w":
            print ("w")
            nextroom = roomkitchen
        elif nextmove == "n":
            print ("n")
            nextroom = roomcloset
        elif nextmove == "s":
            print ("s")
            nextroom = roomsun
        nextroom ()
    return
def roomwerewolf ():
    global aliveflag
    print ("roomwerewolf")
    print ("You were scratched by a werewolf and died")
    aliveflag = "false"
    return
def roommummy ():
    global aliveflag
    print ("roommummy")
    print ("You were attacked by a mummy and died")
    aliveflag = "false"
    print ("Aliveflag", aliveflag)
    return
#
def roomliving ():
    print ("roomliving")
    print ("You are in the living room. There is a large, long couch")
    print ("Nothing interesting here. You retrun back.")
    aliveflag = "true"
    return
def roomkitchen ():
    print ("roomkitchen")
    print ("You are in the kitchen. There is a large, long stove")
    print ("It smells nice in here but you retrun back.")
    aliveflag = "true"
    return
def roomcloset ():
    print ("roomcloset")
    print ("You are in the closet. There is a large, long coat rack")
    print ("You find an interesting coat and you put it on.")
    print ("But nothing else to do so you return.")
    aliveflag = "true"
    return
def roomsun ():
    global aliveflag
    print ("roomsun")
    print ("You are in sun room. There is a large, long window. The sun
kills you.")
    aliveflag = "false"
    return
#
#main
print ("This is Hounted House 2/9/2019 a project of mdlug.org")
print ("You are in the small mud room of mansion with three openings.To the
west is a entryway to a dark area. To the north is a room with a green
light. To the east is a dark room")
print ("enter e w n s lower case to move east west north south")
#global aliveflag
aliveflag = "true"
#nextmove = input ("Enter next move")
while aliveflag == "true":
    print ("You are in the small mud room")
    nextmove = input ("Enter next move")
    if nextmove == "e":
        print ("e")
        nextroom = roomredwitch
    elif nextmove == "w":
        print ("w")
        nextroom = roomentry
    elif nextmove == "n":
        print ("n")
        nextroom = roomempty
    elif nextmove == "s":
        print ("s")
        nextroom = roomgoblin
    print ("Next room is", str(nextroom))
    nextroom ()
    break
#print ("That move is not recognised. You will return to the main room")
#
print ("You have returned to the main room", aliveflag)
if aliveflag == "true":
#    print (aliveflag)
    print ("You are alive")
else:
    print ("You are not alive")
print ("End of Game")
nextmove = input ("Thank You. Press Enter To Exit")
exit()





<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


More information about the mdlug mailing list