-
Notifications
You must be signed in to change notification settings - Fork 0
/
StoryMode_v1.py
70 lines (49 loc) · 1.76 KB
/
StoryMode_v1.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#not finished at all
import tkinter
from tkinter import *
from tkinter.font import Font
window = tkinter.Tk()
window.configure(bg = "cyan")
window.title("Story")
window.geometry("800x400")
f = Font(family='courier', size=14)
def deads():
global dead
global fight
dead.destroy()
fight.destroy()
new.insert(INSERT, "\nYou lay on the ground and play dead.")
def fights():
global dead
global fight
dead.destroy()
fight.destroy()
new.insert(INSERT, "\nYou run up to the bear and try to fight.")
def right():
global fight
global dead
left.destroy()
right.destroy()
new.insert(INSERT,"\nYou take the path to the right.")
new.insert(INSERT,"\nYou are walking down the right path, and you come across a bear.")
new.insert(INSERT,"\nWhat do you do?")
dead = Button(window, height = 3, width = 8, text = "Play Dead", command = deads)
dead.pack(side = BOTTOM)
fight = Button(window, height = 3, width = 8, text = "Attack", command = fights)
fight.pack(side = BOTTOM)
def left():
left.destroy()
right.destroy()
new.insert(INSERT, "\nYou take the path to the left.")
scroll = Scrollbar(window)
scroll.pack(side = RIGHT, fill = Y)
new = Text (window, font = f, height = 13, yscrollcommand = scroll.set)
new.insert(INSERT,"Welcome to interactive story mode!")
new.insert(INSERT,"\nOne day, you were walking in the forest and you came across a path.\n")
new.insert(INSERT,"Do you go RIGHT or LEFT?")
right = Button(window, height = 3, width = 8, text = "RIGHT", command = right )
right.pack(side = BOTTOM)
left = Button(window, height = 3, width = 8, text = "LEFT", command = left )
left.pack(side = BOTTOM)
new.pack()
window.mainloop()