A simple demo visualizing whether the piece would walk off board by following the directions on each tile. Play with it here. Code on GitHub here.