Refine game module and make minor changes to Piece and constants
Add checkGameEnd() function