finish abstraction of mahjong.js