-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutil.py
More file actions
35 lines (32 loc) · 973 Bytes
/
util.py
File metadata and controls
35 lines (32 loc) · 973 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
from init import *
def move_to(x, y):
if abs(x - get_pos_x) < get_world_size() - abs(x - get_pos_x):
if get_pos_x() < x:
while get_pos_x() != x:
move('East')
elif get_pos_x() > x:
while get_pos_x() != x:
move('West')
else:
if get_pos_x() < x:
while get_pos_x() != x:
move('West')
elif get_pos_x() > x:
while get_pos_x() != x:
move('East')
if abs(y - get_pos_y) < get_world_size() - abs(y - get_pos_y):
if get_pos_y() < y:
while get_pos_y() != y:
move('North')
elif get_pos_y() > y:
while get_pos_y() != y:
move('South')
else:
if get_pos_y() < y:
while get_pos_y() != y:
move('South')
elif get_pos_y() > y:
while get_pos_y() != y:
move('North')
def water():
pass