A small typescript port of mine sweeper