Changeset View
Changeset View
Standalone View
Standalone View
src/kmahjongg.cpp
Show First 20 Lines • Show All 232 Lines • ▼ Show 20 Line(s) | |||||
233 | void KMahjongg::undo() | 233 | void KMahjongg::undo() | ||
234 | { | 234 | { | ||
235 | // If the game got stuck (no more matching tiles), the game timer is paused. | 235 | // If the game got stuck (no more matching tiles), the game timer is paused. | ||
236 | // So resume timer if the player decides to undo moves from that state. | 236 | // So resume timer if the player decides to undo moves from that state. | ||
237 | if (m_gameState == GameState::Stuck) { | 237 | if (m_gameState == GameState::Stuck) { | ||
238 | m_gameTimer->resume(); | 238 | m_gameTimer->resume(); | ||
239 | } | 239 | } | ||
240 | m_gameView->undo(); | 240 | m_gameView->undo(); | ||
241 | updateState(GameState::Gameplay); | ||||
241 | updateUndoAndRedoStates(); | 242 | updateUndoAndRedoStates(); | ||
242 | } | 243 | } | ||
243 | 244 | | |||
244 | void KMahjongg::redo() | 245 | void KMahjongg::redo() | ||
245 | { | 246 | { | ||
246 | m_gameView->redo(); | 247 | m_gameView->redo(); | ||
247 | updateUndoAndRedoStates(); | 248 | updateUndoAndRedoStates(); | ||
248 | } | 249 | } | ||
▲ Show 20 Lines • Show All 438 Lines • Show Last 20 Lines |