javascript point calculator for riichi mahjong game