-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathforest.py
More file actions
25 lines (19 loc) · 890 Bytes
/
forest.py
File metadata and controls
25 lines (19 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import random
from items import *
class ForestLocation(object):
def __init__(self, items):
self.items = items
def search(self):
#maybe it would be better to change this to a % based thing
#rather than having a big list of possible items
return random.choice(self.items)
wild = ForestLocation([blueberry, blueberry, apple, \
apple, vine, onion, ginger, strawberry, strawberry, mint, \
brown_mushroom])
bridge = ForestLocation([stone, shijemi, pebbles, \
pebbles, pebbles, vine, vine])
hut = ForestLocation([twig, twig, shijemi, branch, \
branch, branch, branch, bark, bark])
bog = ForestLocation([twig, blueberry, vine, vine, twig, dirt])
mine = ForestLocation([sand, sand, sand, pebbles, \
pebbles, dirt, stone, stone, stone])