diff options
| -rw-r--r-- | engines/avalanche/nim.cpp | 20 | ||||
| -rw-r--r-- | engines/avalanche/nim.h | 2 | 
2 files changed, 20 insertions, 2 deletions
| diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp index 256c713edd..a7abfa391f 100644 --- a/engines/avalanche/nim.cpp +++ b/engines/avalanche/nim.cpp @@ -226,6 +226,7 @@ bool Nim::checkMouse() {  	Common::Point cursorPos = _vm->getMousePos();  	_vm->_graphics->refreshScreen();  	Common::Event event; +	// This loop needs "some" revision!!!  	while (_vm->getEvent(event)) {  		_vm->_graphics->refreshScreen();  		if (event.type == Common::EVENT_LBUTTONUP) { @@ -283,7 +284,24 @@ void Nim::takeSome() {  }  void Nim::endOfGame() { -	warning("STUB: Nim::endOfGame()"); +	CursorMan.showMouse(false); + +	chalk(595, 55 + _turns * 10, "Wins!"); +	_vm->_graphics->drawNormalText("- - -   Press any key...  - - -", _vm->_font, 8, 100, 190, kColorYellow); + +	Common::Event event; +	bool escape = false; +	while (!_vm->shouldQuit() && !escape) { +		_vm->_graphics->refreshScreen(); +		while (_vm->getEvent(event)) { +			if ((event.type == Common::EVENT_LBUTTONUP) || (event.type == Common::EVENT_KEYDOWN)) { +				escape = true; +				break; +			} +		} +	} + +	CursorMan.showMouse(true);  }  bool Nim::find(byte x) { diff --git a/engines/avalanche/nim.h b/engines/avalanche/nim.h index b756460a36..6afb915e47 100644 --- a/engines/avalanche/nim.h +++ b/engines/avalanche/nim.h @@ -71,7 +71,7 @@ private:  	void endOfGame();  	bool find(byte x); // This gives TRUE if there's a pile with x stones in.  	void findAp(byte start, byte stepSize); -	void dogFood(); +	void dogFood(); // AI procedure to play the game.  };  } // End of namespace Avalanche | 
