UI without jQuery nightmare. Game logic. some invalid moves are still to be detected. Need better design.
Cleaning. Remove debug instruction.