Feat: done except full reset, maze, dino
This commit is contained in:
40
maze.py
40
maze.py
@@ -1,5 +1,5 @@
|
||||
import solve, utils
|
||||
import sunflower
|
||||
import pumpkin
|
||||
|
||||
d = [North, West, South, East]
|
||||
def grow(xl, yl, n, repeat=1):
|
||||
@@ -45,10 +45,36 @@ def grow(xl, yl, n, repeat=1):
|
||||
|
||||
return (init, run)
|
||||
|
||||
def grow_full(x, y, replant=False):
|
||||
substance = 4 * 2**(num_unlocked(Unlocks.Mazes) - 1)
|
||||
|
||||
def ret():
|
||||
utils.mv(x, y)
|
||||
do_a_flip()
|
||||
|
||||
while True:
|
||||
if get_entity_type() == Entities.Treasure:
|
||||
harvest()
|
||||
if replant and get_entity_type() != Entities.Hedge:
|
||||
plant(Entities.Bush)
|
||||
use_item(Items.Weird_Substance, substance)
|
||||
|
||||
return ret
|
||||
|
||||
if __name__ == '__main__':
|
||||
set_world_size(32)
|
||||
utils.spawn(solve.run([
|
||||
sunflower.growbase(0, 2, 0, 8),
|
||||
sunflower.grow(2, 8, 0, 8),
|
||||
]))
|
||||
solve.run([grow(0, 0, 32)])()
|
||||
set_world_size(8)
|
||||
clear()
|
||||
|
||||
jobs = list()
|
||||
for d in range(2):
|
||||
for x in range(4):
|
||||
for y in range(4):
|
||||
if x == 2 and y == 2:
|
||||
jobs.append(grow_full(d*4+x, y, True))
|
||||
else:
|
||||
jobs.append(grow_full(d*4+x, y))
|
||||
|
||||
for job in jobs[:-1]:
|
||||
spawn_drone(job)
|
||||
|
||||
jobs[-1]()
|
||||
|
||||
Reference in New Issue
Block a user