Todo: Fix selectedPiece.
Fix a logic bug in determining lose().