Changeset View
Changeset View
Standalone View
Standalone View
minefielditem.h
Context not available. | |||||
129 | */ | 129 | */ | ||
---|---|---|---|---|---|
130 | QList<FieldPos> adjacentRowColsFor(int row, int col); | 130 | QList<FieldPos> adjacentRowColsFor(int row, int col); | ||
131 | /** | 131 | /** | ||
132 | * Checks if player lost the game | 132 | * Checks if player lost the game. Return `true` if lost. | ||
133 | * A `true` return value and a `false` `m_gameOver` indicates that the game is restarted. | ||||
133 | */ | 134 | */ | ||
134 | void checkLost(); | 135 | bool checkLost(); | ||
135 | /** | 136 | /** | ||
136 | * Checks if player won the game | 137 | * Checks if player won the game. Return `true` if won. | ||
137 | */ | 138 | */ | ||
138 | void checkWon(); | 139 | bool checkWon(); | ||
139 | /** | 140 | /** | ||
140 | * Reveals all unmarked items containing mines | 141 | * Reveals all unmarked items containing mines | ||
141 | */ | 142 | */ | ||
Context not available. | |||||
158 | */ | 159 | */ | ||
159 | void setupBorderItems(); | 160 | void setupBorderItems(); | ||
160 | 161 | | |||
161 | void onItemRevealed(int row, int col); | 162 | /** | ||
163 | * Return `true` if the game is finished (and possibly restarted) after the call. | ||||
164 | */ | ||||
165 | bool onItemRevealed(int row, int col); | ||||
162 | // overload | 166 | // overload | ||
163 | void onItemRevealed(CellItem* item); | 167 | bool onItemRevealed(CellItem* item); | ||
164 | 168 | | |||
165 | // note: in member functions use itemAt (see above ) | 169 | // note: in member functions use itemAt (see above ) | ||
166 | // instead of hand-computing index from row & col! | 170 | // instead of hand-computing index from row & col! | ||
Context not available. |