-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
23 lines (18 loc) · 692 Bytes
/
main.py
File metadata and controls
23 lines (18 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from state import Context
if __name__ == '__main__':
tamagoshi = Context()
# It'll print 1
print("Initial points:", tamagoshi.get_points())
tamagoshi.give_input('give_food')
# It'll print 2
print("Points after give food one time:", tamagoshi.get_points())
tamagoshi.give_input('give_food')
tamagoshi.give_input('give_food')
# It'll print 8
print("Points after give food two times:", tamagoshi.get_points())
tamagoshi.give_input('make_face')
# It'll print 4
print("Points after make face:", tamagoshi.get_points())
tamagoshi.give_input('do_nothing')
# It'll print 4
print("Points after do nothing:", tamagoshi.get_points())