take_drop_aims.py 602 Bytes
Newer Older
Ahmad Reza's avatar
Ahmad Reza committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""
This solution just scans for particles that are within 5 hops range and prints them out.
"""

import logging
from locale import str

NE = 0
E = 1
SE = 2
SW = 3
W = 4
NW = 5


direction = [NE, E, SE, SW, W, NW]

18
19
def solution(sim):
    if sim.get_actual_round() == 1 :
20
        sim.get_particle_list()[0].take_tile_in(E)
21
    elif sim.get_actual_round() == 2 :
22
        sim.get_particle_list()[0].drop_tile_in(NW)
23
    elif sim.get_actual_round() == 3 :
24
        sim.get_particle_list()[0].take_particle_in(W)
25
    elif sim.get_actual_round() == 4:
26
        sim.get_particle_list()[0].drop_particle_in(SE)
Ahmad Reza's avatar
Ahmad Reza committed
27