Tanks

Each snippet is the body of a function called once per round. It receives me, enemy (nearest living enemy), enemies (all living enemies), bullets (in flight) and grid, and must return an array of two actions, carried out one after the other. Each action is "left", "right", "forward" or "fire". Anything else means wait for that step. Bullets fly 4 squares per step and reach 10 squares. Last tank standing wins.