implemented bfs
made some minor improvements to map and tile