And who would decide, and how would you decide, that there are no longer any moves available? And what happens if the game says there are more moves available but you can't find them, no matter how many times you play it? What would be the point of that? You're the best person to decide if there are any more moves available. Don't take a software program's opinion of how many moves are left in a game.
Every game has rules about which cards you can drag and where those cards can go. So we could scan an see if there's anything that could technically move. Some games are so lax that there's always a move that is technically valid even though it doesn't advance that game (like moving a king back and forth between 2 empty piles in klondike).
We actually do this check explicitly in some games—Golf and Pyramid end immediately when there's nothing left to do (which I kind of don't like myself since it breaks undo on the last move).
I've thought about making a more generic approach that popped up a dialog saying "no more moves" with some buttons ("undo", "retry", "give up"). Popping up a dialog that obscures part of the board is kind of annoying though…
Comments
And who would decide, and how would you decide, that there are no longer any moves available? And what happens if the game says there are more moves available but you can't find them, no matter how many times you play it? What would be the point of that? You're the best person to decide if there are any more moves available. Don't take a software program's opinion of how many moves are left in a game.
@Kkid very difficult to determine when there is an ‘undo’ feature. The logic is that there are always moves available.
Every game has rules about which cards you can drag and where those cards can go. So we could scan an see if there's anything that could technically move. Some games are so lax that there's always a move that is technically valid even though it doesn't advance that game (like moving a king back and forth between 2 empty piles in klondike).
We actually do this check explicitly in some games—Golf and Pyramid end immediately when there's nothing left to do (which I kind of don't like myself since it breaks undo on the last move).
I've thought about making a more generic approach that popped up a dialog saying "no more moves" with some buttons ("undo", "retry", "give up"). Popping up a dialog that obscures part of the board is kind of annoying though…