Continue porting minesweeper program from C++ to js.