-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.py
More file actions
42 lines (31 loc) · 872 Bytes
/
init.py
File metadata and controls
42 lines (31 loc) · 872 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import random
word_size = random.randint(1, 16) # Simulate world size between 1 and 16
pos_x, pos_y = random.randint(0, word_size - 1), random.randint(0, word_size - 1)
def get_world_size():
return word_size
def get_pos_x():
return pos_x
def get_pos_y():
return pos_y
def move(direction):
global pos_x, pos_y
if direction == 'North' and pos_y > 0:
pos_y -= 1
elif direction == 'South' and pos_y < word_size - 1:
pos_y += 1
elif direction == 'West' and pos_x > 0:
pos_x -= 1
elif direction == 'East' and pos_x < word_size - 1:
pos_x += 1
def plant(EntityType):
pass
def get_ground_type():
return random.choice(['Soil', 'Grass'])
def get_entity_type():
return random.choice(['Healthy Pumpkin', 'Bad Pumpkin'])
def till():
pass
def harvest():
pass
def can_move():
return True