forked from Maecena/Py.FarmGame
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.py
More file actions
25 lines (19 loc) · 669 Bytes
/
search.py
File metadata and controls
25 lines (19 loc) · 669 Bytes
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
import random
import player as player
#places = wild , bridge , hut , bog
wild_search = ['blueberry', 'blueberry', 'pebbles']
bridge_search = ['stone', 'shijemi', 'pebbles', 'pebbles', 'pebbles']
hut_search = ['twig', 'twig', 'shijemi', 'branch', 'bark', 'bark']
bog_search = ['twig', 'blueberry', 'twig', 'dirt']
class gather(object):
def __init__(self, items):
self.items = items
def find(self):
found = random.choice(self.items)
print ("You found a " + str(found) + "!")
player.pc.add_inv(found)
return
wild = gather(wild_search)
bridge = gather(bridge_search)
hut = gather(hut_search)
bog = gather(bog_search)