Commit a162ff01 authored by Ahmad Reza Cheraghi's avatar Ahmad Reza Cheraghi
Browse files

Upload New File

parent ad93063e
"""
This scenario just scans for particles that are within 5 hops range and prints them out.
"""
import logging
from locale import str
E = 0
SE = 1
SW = 2
W = 3
NW = 4
NE = 5
def scenario(sim, world):
if sim.get_actual_round() == 1:
all_aims_list=world.get_particle_coords_map()[(0,0)].scan_for_aim_within(aim='tiles')
for list in all_aims_list:
if list.type=='tile':
print("tile", list.coords)
elif sim.get_actual_round() == 2 :
world.get_particle_list()[0].take_tile_in(E)
elif sim.get_actual_round() == 4 :
world.get_particle_list()[0].drop_tile()
elif sim.get_actual_round() == 5:
world.get_particle_list()[0].take_tile()
elif sim.get_actual_round() == 6:
world.get_particle_list()[0].drop_tile_in(W)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment