aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/nim.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp
index a2572f1fa5..15146eaf63 100644
--- a/engines/avalanche/nim.cpp
+++ b/engines/avalanche/nim.cpp
@@ -35,11 +35,27 @@ const char * const Nim::kNames[2] = {"Avalot", "Dogfood"};
Nim::Nim(AvalancheEngine *vm) {
_vm = vm;
- _playedNim = 0;
+ resetVariables();
}
void Nim::resetVariables() {
_playedNim = 0;
+ _turns = 0;
+ _dogfoodsTurn = false;
+ _stonesLeft = 0;
+ _clicked = false;
+ _row = 0;
+ _number = 0;
+ _squeak = false;
+ _mNum = 0;
+ _mRow = 0;
+
+ for (int i = 0; i < 3; i++) {
+ _old[i] = 0;
+ _stones[i] = 0;
+ }
+
+ memset(_stonePic, 0, 4 * 23 * 7);
}
void Nim::synchronize(Common::Serializer &sz) {