none
Text Based Adventure Game Help RRS feed

  • Question

  • One of my students is working with Small Basic for a project. He wants to make a simple Zork type game. Can someone help and/or post some example code on how to pose a situation for a character to go east, west ect. and what happens next.

    begin:

    TextWindow.Writeline("You're at a fork in the road.  ")

    TextWindow.Writeline("Which way do you go? ")

    TextWindow.WriteLine("LEFT RIGHT or STAY")

    b= TextWindow.Read()

    If b="left" Then

      TextWindow.Writeline(" Good choice, you find some money. :)")

      TextWindow.Writeline(" Have a nice day.")

      endif

    Is there a better way than If Then endif statements?

    thanks

    Thursday, May 10, 2012 9:32 PM

Answers

All replies