mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 01:27:44 +00:00
2048: Let user decide if he wants to continue the game
Before game finish when a player has reached target tile, Now player will be able to decide if he wants to continue or not
This commit is contained in:
parent
accf4b338d
commit
d609dde7b0
3 changed files with 18 additions and 8 deletions
|
@ -232,7 +232,7 @@ Game::MoveOutcome Game::attempt_move(Direction direction)
|
|||
add_tile();
|
||||
}
|
||||
|
||||
if (is_complete(m_board, m_target_tile))
|
||||
if (is_complete(m_board, m_target_tile) && !m_want_to_continue)
|
||||
return MoveOutcome::Won;
|
||||
if (m_board.is_stalled())
|
||||
return MoveOutcome::GameOver;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue