An implementation of fog of war algoritm for tile-based games