scanning_for_all_aims.py 607 Bytes
Newer Older
Ahmad Reza's avatar
Ahmad Reza committed
1
2
3
4
"""
This solution just scans for particles that are within 5 hops range and prints them out.
"""

5
#Standard Lib that has to be in each solution
Ahmad Reza's avatar
Ahmad Reza committed
6

7
def solution(sim):
Ahmad Reza's avatar
Ahmad Reza committed
8
9

    all_matters_list=[]
10
    if sim.get_actual_round() == 1:
11
        all_matters_list=sim.get_particle_map_coords()[(0,0)].scan_for_matter_within(hop=5)
Ahmad Reza's avatar
Ahmad Reza committed
12
13
14
15
16
        for list in all_matters_list:
            if list.type=='particle':
                print ("particle at", list.coords)
            elif list.type=='tile':
                print("tile", list.coords)
17
18
            elif list.type=='marker':
                print("marker", list.coords)
Ahmad Reza's avatar
Ahmad Reza committed
19