take_drop_aims.py 622 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
18
19
20
21
22
23
24
25
26
27
"""
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]

def solution(self, world):
    if self.get_actual_round() == 1 :
        world.get_particle_list()[0].take_tile_in(E)
    elif self.get_actual_round() == 2 :
        world.get_particle_list()[0].drop_tile_in(NW)
    elif self.get_actual_round() == 3 :
        world.get_particle_list()[0].take_particle_in(W)
    elif self.get_actual_round() == 4:
        world.get_particle_list()[0].drop_particle_in(SE)