Implementation of the MahJong game using Javascript