problems in battlegrid

must have been tired when i wrote the lookup logic.
fixed that and added dbg functions to battlegrid and tile