Added more code to support Set game logic.