Game Over!
- {alert.contents.map((e, i) => (
+ {alert.contents.results.map((e, i) => (
{e}
))}
+ {alert.contents.stats.pro}
+ {alert.contents.stats.back}
+ {alert.contents.stats.taxPerson}
+ {alert.contents.stats.emergency}
);
diff --git a/src/components/farm/interface.js b/src/components/farm/interface.js
index a2d270d..e4c3725 100644
--- a/src/components/farm/interface.js
+++ b/src/components/farm/interface.js
@@ -126,7 +126,7 @@ function handleMessage(evt) {
store.dispatch(autoSkip(data.component));
}
if (data.event === 'end-of-game') {
- store.dispatch(alert(ALERTS.endOfGame, data.results, 'endOfGame' + data.game.turn));
+ store.dispatch(alert(ALERTS.endOfGame, { results: data.results, stats: data.stats }, 'endOfGame' + data.game.turn));
}
});
};
diff --git a/src/server/farm.scm b/src/server/farm.scm
index 2073fb1..ce6c152 100644
--- a/src/server/farm.scm
+++ b/src/server/farm.scm
@@ -129,7 +129,13 @@
(harvesting initform: #f accessor: player-harvesting)
(hay-doubled initform: #f accessor: player-hay-doubled)
(corn-doubled initform: #f accessor: player-corn-doubled)
- (ready-to-start initform: #f accessor: player-ready-to-start)))
+ (ready-to-start initform: #f accessor: player-ready-to-start)
+ (stats initform:
+ '((pro . 0)
+ (back . 0)
+ (tax-person . 0)
+ (emergency . 0))
+ accessor: player-stats)))
(define-class