[Scummvm-git-logs] scummvm master -> 4fe1a62574c3b26d72220a9fd6111ee02992c596
dreammaster
noreply at scummvm.org
Tue Feb 3 09:56:51 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
4fe1a62574 BAGEL: MINIGAMES: Fix evolution logic for Game of Life
Commit: 4fe1a62574c3b26d72220a9fd6111ee02992c596
https://github.com/scummvm/scummvm/commit/4fe1a62574c3b26d72220a9fd6111ee02992c596
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-02-03T20:56:38+11:00
Commit Message:
BAGEL: MINIGAMES: Fix evolution logic for Game of Life
Changed paths:
NEWS.md
engines/bagel/hodjnpodj/life/life.cpp
diff --git a/NEWS.md b/NEWS.md
index 6f082d82a4d..e9726dedde7 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -16,6 +16,7 @@ For a more comprehensive changelog of the latest experimental code, see:
- Fix Enter/Escape keys in The Guessing Game guess dialog
- Fix using Enter key to close info dialogs
- Fix shell animations in Mankala minigame
+ - Fixed incorrect evolution logic in Game of Life
MM:
- Fixed M&M1 memory corruption on exit.
diff --git a/engines/bagel/hodjnpodj/life/life.cpp b/engines/bagel/hodjnpodj/life/life.cpp
index 07e59786cc3..3274aadb059 100644
--- a/engines/bagel/hodjnpodj/life/life.cpp
+++ b/engines/bagel/hodjnpodj/life/life.cpp
@@ -323,10 +323,10 @@ void CLife::evolution(CDC *pDC) {
CPoint sprite_loc; // center location of sprite on board
int i; // used to gen random village
int row, col; // indexs help find board cell
- colony pColonyCopy((*pColony).row(), (*pColony).col());
+ colony colonyCopy((*pColony).row(), (*pColony).col());
// make copy of original pColony for later ref
- pColonyCopy = (*pColony);
+ colonyCopy = (*pColony);
// Update stats
if (m_nYears == 0) //just starting evolution?
m_nCumLife = (*pColony).m_nColony_count;
@@ -337,7 +337,7 @@ void CLife::evolution(CDC *pDC) {
m_dScore = ((double) m_nCumLife) / ((double) m_nYears);
//Evolve internal board
- (*pColony).evolve(*pColony);
+ (*pColony).evolve(colonyCopy);
// update score
if (m_nCumLife > LARGE && bIsInfiniteTurns) { // This prevents int overflow
@@ -350,13 +350,13 @@ void CLife::evolution(CDC *pDC) {
gMainWnd->RefreshStats();
//Update visual board
- if (pColonyCopy != (*pColony))
+ if (colonyCopy != (*pColony))
for (row = 0; row < (*pColony).row(); row++)
for (col = 0; col < (*pColony).col(); col++) {
pSprite = CSprite::GetSpriteChain();
// Any change for this particular cell?
- if (pColonyCopy.islife(row, col) == (*pColony).islife(row, col))
+ if (colonyCopy.islife(row, col) == (*pColony).islife(row, col))
continue; // no change -- loop
if ((*pColony).islife(row, col)) { //Need to put a sprite there?
More information about the Scummvm-git-logs
mailing list