コード例 #1
0
    def introduction(self):
        # Game overview
        self.narrator.say("In today's show our " + str(len(self.contestants)) +
                          " contestants will win up to $10,000")
        self.narrator.say(
            "The others will leave with nothing when voted off as the...")
        time.sleep(self.delay)
        self.printASCIIArtFromFile("logo.txt")
        self.waitForPlayerToContinue()
        self.clearScreen()
        self.host.say(
            "Any of the " + str(len(self.contestants)) +
            " people in the studio here today could win up to $10,000.")
        self.host.say(
            "They've only just met but to get the prize money they'll have to work together."
        )
        self.host.say("However, " + (str(len(self.contestants) - 1)) +
                      " will leave with nothing.")
        self.host.say(
            "Round by round we lose the player voted the weakest link.")
        print()
        self.waitForPlayerToContinue()
        self.clearScreen()

        # Contestant introduction
        self.host.say("Let's meet the team...")
        print()
        for player in self.contestants:
            player.say("I'm " + player.name + ". " + player.age +
                       " years old from " + player.city + ". And I'm a " +
                       player.occupation)
            time.sleep(self.delay)
        print()
        self.waitForPlayerToContinue()
        self.clearScreen()

        # Banking Instructions
        self.host.say(
            "Okay, just to remind you each round there's $1000 to be won.")
        self.host.say(
            "The fastest way is to create a chain of nine correct answers.")

        demoBank = Bank()
        print()
        for i in range(8):
            demoBank.moveUp()
            if (i > 4):
                print(demoBank)
                print()
                time.sleep(self.delay / 8)
        self.host.say(
            "Break the chain and you lose all the money in that chain.")
        print()
        print("Bank!")
        demoBank.bankCurrentAmount()
        print(demoBank)
        print()
        self.host.say(
            "Bank before the question is asked and the money is safe.")
        # we start with the person who's name starts alphabetically
        print()
        self.waitForPlayerToContinue()