// The Hollow Cottage // Chapter 4 const cottageName = "The Hollow Cottage" writeln("You are standing outside " + cottageName + ".") var playerName = input("What is your name, traveler? ") writeln("Welcome, " + playerName + ".") var tries = 0 var solved = false while tries < 3 and not solved tries = tries + 1 var answer = input("The door asks: what has keys but no locks? ") if answer == "piano" then writeln("The door swings open. You step inside.") solved = true else writeln("Nothing happens.") end if end while if not solved then writeln("The door refuses to budge. You'll have to find another way in.") end if