Fixed bugs when game is lost

The game is now immediately lost after making a move instead of waiting
for the next move. The undo and powerup buttons are now disabled after
the game is lost.