summaryrefslogtreecommitdiffstats
path: root/weatbag/tiles/n2w2.py
blob: 390ef19b51370f3597f5db075437cdb9d55b84d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from weatbag import words

class Tile:
    def __init__(self):
        self.first_visit = True

    def describe(self):
        if self.first_visit:
            print("You are now on the island. The children are returning back "
                  "to the mainland with their raft.\n"
                  "In front of you there are some trees and a small path.\n"
                  "Feeling adventurous?\n")
            self.first_visit = False
        else:
            print("The beach is quiet. Nothing seems to be going on.")

    def action(self, player, do):
        if do[0] in words.yes:
            print("Awesome! Follow the path!")
        elif do[0] in words.no:
            print("You might be in the wrong place then. Pack your stuff and "
                  "quit the game.")
        else:
            print("Sorry, wat?!")

    def leave(self, player, direction):
        if direction == "e":
            print("You can't go back by swimming, that part is full of "
                  "electric eels.\n")
            return False
        else:
            return True