Sunday, 30 October 2016

practice pseudocode for text based game 3

continued

Option3 = false

while Option3 = false

    Move 3 = "what do you do"
   
    If Move3 = forward then
        Output "there is a speaker in the far right corner of the room that crackles to life"
        Option3 = true

    else then
        Output "that isn't an option"
        Option3 = false

Option4 = false

while option4 = false

    Question2 "Johnny's mum has 3 children the first is called may, the second is called June. what is the name of the third?"

    case select Question2
        case = Johnny or john
            Output " that is correct"
            Option4 = true
        case = July
            Output"that is the obvious answer re read the question"
            Option4 = false
        else
            Output" that is incorrect try again"
            Option4 = false

   

No comments:

Post a Comment