diff --git a/AGENTS.md b/AGENTS.md index 4c6fd6f..6cc1598 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,11 +7,12 @@ This project is a Ruby on Rails application developed for the IKEA Foundation. I - **Multi-lingual Support:** Uses the `mobility` gem for translating content into numerous languages. Supported locales include: en, zh, hr, cs, da, nl, fi, fr, fr-CA, de, hu, it, ja, ko, nb, pl, pt, ro, sr, sk, sl, es, sv, uk. - **Hierarchical Content Management:** A "Node" system (using `ancestry`) for managing pages, stages, and interactive elements. - **Player Progression:** Tracks player progress, scores, and decisions across different stages in the `Player` model's `progress` JSONB field. -- **Interactive Game Flow:** Managed by `StagesController`, featuring: - - **Flip:** Randomly determines if a stage is a "chance" or "choice" event. - - **Reveal:** Displays the specific content for the flipped event. - - **Pick:** For "chance", randomly samples an outcome; for "choice", records the player's selection. - - **Result:** Shows the outcome (e.g., best, bad, good, game_over) based on the previous step. +- **Interactive Game Flow:** Managed by `GameController`, featuring: + - **Stage:** Presents a stage's answer nodes (`good_answer`, `bad_answer`, or `chance`). + - **Answer:** Records the player's selection; for `chance`, an outcome child is sampled. + - **Stage result:** Shows the outcome node and applies its score. + - **Last save / Results:** Final compost-vs-landfill choice, then the scored results screen. +- **Scoring:** Answer scores live in `config/question_scores.json`, not in the database. See below. - **Admin Interface:** A backend for managing nodes, assets (Active Storage), users, and translations. - **Search:** `pg_search` integration for content discovery. @@ -27,17 +28,38 @@ This project is a Ruby on Rails application developed for the IKEA Foundation. I - `Node`: The central content model. Templates are hierarchy-dependent: - **Root (Depth 0):** `start` - - **Level 1:** `stage` - - **Level 2:** `choice`, `chance` - - **Level 3 (under choice/chance):** `best`, `bad`, `good`, `game_over` -- `Player`: Tracks session state, `progress`, `current_stage`, and `score`. + - **Level 1:** `facts`, `intro`, `stage`, `last_save`, `results` + - **Level 2 (answers under a stage):** `good_answer`, `bad_answer`, `chance` + - **Level 3 (outcomes under a chance):** `good_answer`, `bad_answer` +- `Player`: Tracks session state, `progress` (per-stage `answer_id` / `result_id`), the + cumulative `score`, and the `scores` hash keyed by `food_waste`, `emissions`, `income`. - `Asset` & `Attachment`: Handles media and its contextual content (body text, styling) associated with nodes. - `User`: Admin authentication and roles. +## Scoring + +Scores are **not** stored on nodes. `config/question_scores.json` holds them, and +`GameController#score_entry_for` maps a node to its entry **by `position`**: + +- `stages[stage_index - 1].answers[answer.position - 1]` for a normal answer. +- For a `chance` outcome, the parent chance node's entry is looked up the same way and + the outcome is read from its `outcomes[child.position - 1]`. + +Each entry has an `overall` value (feeds `player.score` and the result band) and an +`impact` hash of `food_waste` / `emissions` / `income` deltas (feed the per-category +tones in `GameHelper`). `type` and `early_exit` are documentation only — nothing reads them. + +**Gotcha:** because the mapping is positional, the JSON must mirror the node tree exactly. +A `chance` answer needs a `{"type": "chance", "outcomes": [...]}` entry at its position; if +it is flattened into sibling entries instead, the outcome lookup silently returns `nil` and +that branch scores nothing. Verify with a `bin/rails runner` walk of the tree after editing. + ## Project Structure - `app/controllers/admin/`: Admin backend logic. -- `app/controllers/stages_controller.rb`: Main game loop (Flip -> Reveal -> Pick -> Result). -- `app/controllers/site_controller.rb`: Content delivery for standard pages. +- `app/controllers/game_controller.rb`: Main game loop (stage -> answer -> result -> results). +- `app/controllers/api/`: JSON endpoints (see `docs/leaderboard_api.md`). +- `app/helpers/game_helper.rb`: Result bands and per-impact tone thresholds. - `app/models/concerns/`: Shared logic for ancestry, attachments, and tags. - `config/locales/`: YAML translation files. +- `config/question_scores.json`: Answer scoring table. diff --git a/app/helpers/game_helper.rb b/app/helpers/game_helper.rb index e6b205d..ce516c4 100644 --- a/app/helpers/game_helper.rb +++ b/app/helpers/game_helper.rb @@ -46,13 +46,31 @@ module GameHelper RESULT_BANDS = [ [ 8, :best ], [ 5, :balanced ], [ 0, :worst ] ].freeze + BAND_RANK = { worst: 1, balanced: 2, best: 3 }.freeze + def result_state(player) if (answer_id = player.last_save_answer_id) return last_save_result_state(answer_id) end overall = player.score.to_i - RESULT_BANDS.find { |threshold, _| overall >= threshold }.last + band = RESULT_BANDS.find { |threshold, _| overall >= threshold }.last + + # The headline may never read worse than the three impact texts below it: + # green metrics with a low overall would otherwise land on "close call". + # The floor only lifts the band, never lowers it. + floor = tone_floor(player) + BAND_RANK[floor] > BAND_RANK[band] ? floor : band + end + + + # Lowest band the impact texts allow, derived from the same tones they use. + def tone_floor(player) + tones = Player::SCORE_KEYS.map { |category| impact_tone(player, category.to_sym) } + + return :best if tones.count(:positive) == tones.size + return :balanced if tones.none?(:negative) + :worst end diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 1f20360..96c02a9 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -67,7 +67,7 @@ cs: income: label: Příjmy positive: Rajče jsi prodal/a na místním trhu, což znamená, že sis vydělal/a nějaké peníze! - neutral: Rajče jsi prodal/a na místním trhu, což znamená, že sis vydělal/a nějaké peníze! + neutral: Rajče se prodalo, ale tentokrát z toho nebyl velký zisk. negative: Nebylo to snadné, ale podařilo se ti rajče prodat, což znamená, že sis vydělal/a nějaké peníze. early_exit: positive: Rajče ti nevydělalo žádné peníze – jeho prodej by mohl být obtížný, i kdyby se nezkazilo. diff --git a/config/locales/da.yml b/config/locales/da.yml index bdfec66..3ca3c1b 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -69,7 +69,7 @@ da: income: label: Indkomst positive: Du solgte din tomat lokalt, så du tjente lidt penge! - neutral: Du solgte din tomat lokalt, så du tjente lidt penge! + neutral: Din tomat blev solgt, men der var ikke meget profit denne gang. negative: Det var ikke let, men du fik solgt din tomat, så du tjente lidt penge. early_exit: positive: Du tjente ingen penge på din tomat – og selv hvis din tomat ikke var blevet til madspild, kunne det have været svært at sælge den. diff --git a/config/locales/de.yml b/config/locales/de.yml index b7326a2..d4cf0a6 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -68,7 +68,7 @@ de: income: label: Einkommen positive: Du hast deine Tomate lokal verkauft, was bedeutet, dass du etwas Geld verdient hast! - neutral: Du hast deine Tomate lokal verkauft, was bedeutet, dass du etwas Geld verdient hast! + neutral: Deine Tomate wurde verkauft, aber diesmal blieb nicht viel Gewinn übrig. negative: Es war nicht einfach, aber du hast es geschafft, deine Tomate zu verkaufen, was bedeutet, dass du etwas Geld verdient hast. early_exit: positive: Du hast kein Geld für deine Tomate verdient – und selbst wenn deine Tomate nicht verdorben wäre, wäre es schwierig gewesen, sie zu verkaufen. diff --git a/config/locales/en.yml b/config/locales/en.yml index f41a27a..2f3bb91 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -93,7 +93,7 @@ en: income: label: Income positive: You sold your tomato locally, which means you earned some money! - neutral: You sold your tomato locally, which means you earned some money! + neutral: Your tomato was sold, but there wasn't much profit this time. negative: It wasn't easy, but you managed to sell your tomato, which means you earned some money. early_exit: diff --git a/config/locales/es.yml b/config/locales/es.yml index 25c44e4..0381cbc 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -68,7 +68,7 @@ es: income: label: Ingresos positive: Has vendido el tomate en tu zona, lo que significa que has ganado algo de dinero. - neutral: Has vendido el tomate en tu zona, lo que significa que has ganado algo de dinero. + neutral: Has vendido el tomate, pero esta vez no has sacado mucho beneficio. negative: No ha sido fácil, pero has conseguido vender el tomate, lo que significa que has ganado algo de dinero. early_exit: positive: No has ganado nada con el tomate, y aunque no se hubiera echado a perder, venderlo podría haber sido complicado. diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 7f0caea..609bcbc 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -68,7 +68,7 @@ fi: income: label: Tulot positive: Myit tomaatin paikallisesti, eli ansaitsit hieman rahaa! - neutral: Myit tomaatin paikallisesti, eli ansaitsit hieman rahaa! + neutral: Myit tomaatin, mutta tällä kertaa siitä ei jäänyt paljon voittoa. negative: Se ei ollut helppoa, mutta sait tomaatin myytyä ja ansaitsit hieman rahaa. early_exit: positive: Et ansainnut rahaa tomaatillasi – ja vaikka tomaattisi ei olisi päätynyt jätteeksi, sen myyminen olisi saattanut olla vaikeaa. diff --git a/config/locales/fr-CA.yml b/config/locales/fr-CA.yml index 7e3134c..1dbf239 100644 --- a/config/locales/fr-CA.yml +++ b/config/locales/fr-CA.yml @@ -68,7 +68,7 @@ fr-CA: income: label: Revenus positive: Vous avez vendu votre tomate localement, ce qui signifie que vous avez gagné un peu d’argent ! - neutral: Vous avez vendu votre tomate localement, ce qui signifie que vous avez gagné un peu d’argent ! + neutral: Votre tomate a été vendue, mais elle n’a pas rapporté beaucoup cette fois-ci. negative: Ce n’était pas facile, mais vous avez réussi à vendre votre tomate, ce qui signifie que vous avez gagné un peu d’argent. early_exit: positive: Vous n’avez pas gagné d’argent avec votre tomate ; et même si votre tomate n’avait pas été gaspillée, il aurait pu être difficile de la vendre. diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 6c49f65..01de5cd 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -67,7 +67,7 @@ fr: income: label: Revenus positive: Vous avez vendu votre tomate localement, ce qui signifie que vous avez gagné un peu d’argent ! - neutral: Vous avez vendu votre tomate localement, ce qui signifie que vous avez gagné un peu d’argent ! + neutral: Votre tomate a été vendue, mais elle n’a pas rapporté beaucoup cette fois-ci. negative: Ce n’était pas facile, mais vous avez réussi à vendre votre tomate, ce qui signifie que vous avez gagné un peu d’argent. early_exit: positive: Vous n’avez pas gagné d’argent avec votre tomate ; et même si votre tomate n’avait pas été gaspillée, il aurait pu être difficile de la vendre. diff --git a/config/locales/hr.yml b/config/locales/hr.yml index aa72993..7b24770 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -68,7 +68,7 @@ hr: income: label: Prihodi positive: Prodao/la si svoju rajčicu lokalno, što znači da si zaradio/la nešto novca! - neutral: Prodao/la si svoju rajčicu lokalno, što znači da si zaradio/la nešto novca! + neutral: Rajčica je prodana, ali ovaj put na njoj nisi puno zaradio/la. negative: Nije bilo lako, ali uspio/la si prodati svoju rajčicu, što znači da si zaradio/la nešto novca. early_exit: positive: Nisi zaradio/la ništa na svojoj rajčici – a čak i da tvoja rajčica nije završila kao otpad, možda bi je bilo teško prodati. diff --git a/config/locales/hu.yml b/config/locales/hu.yml index bc69735..e34c2b3 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -70,7 +70,7 @@ hu: income: label: Jövedelem positive: Helyben adtad el a paradicsomodat, így szereztél egy kis pénzt. - neutral: Helyben adtad el a paradicsomodat, így szereztél egy kis pénzt. + neutral: A paradicsomod elkelt, de ezúttal nem sok haszon származott belőle. negative: Nem volt könnyű, de sikerült eladnod a paradicsomodat, így szereztél egy kis pénzt. early_exit: positive: Nem kerestél pénzt a paradicsomoddal, és még ha nem is veszett volna kárba, akkor is nehezen tudtad volna eladni. diff --git a/config/locales/it.yml b/config/locales/it.yml index fc87430..7537055 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -68,7 +68,7 @@ it: income: label: Guadagno positive: Hai venduto il tuo pomodoro a livello locale, quindi hai guadagnato un po' di denaro! - neutral: Hai venduto il tuo pomodoro a livello locale, quindi hai guadagnato un po' di denaro! + neutral: Il tuo pomodoro è stato venduto, ma questa volta il guadagno è stato scarso. negative: "Non è stato facile, ma ce l'hai fatta: hai venduto il tuo pomodoro e quindi hai guadagnato un po' di denaro." early_exit: positive: Il tuo pomodoro non ti ha fatto guadagnare nulla e, anche se non si fosse rovinato, venderlo sarebbe stato comunque difficile. diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 4de64c8..95d7bc0 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -68,7 +68,7 @@ ja: income: label: 収入 positive: 地元でトマトを販売して、収入を得ることができました! - neutral: 地元でトマトを販売して、収入を得ることができました! + neutral: トマトは売れましたが、今回はあまり利益になりませんでした。 negative: 簡単ではありませんでしたが、トマトを販売して、収入を得ることができました。 early_exit: positive: トマトで収入を得ることはできませんでした。たとえトマトがムダにならなかったとしても、販売するのは難しかったかもしれません。 diff --git a/config/locales/ko.yml b/config/locales/ko.yml index c279d28..f8d33ca 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -68,7 +68,7 @@ ko: income: label: 소득 positive: 토마토를 지역에서 판매해 수익을 올렸어요! - neutral: 토마토를 지역에서 판매해 수익을 올렸어요! + neutral: 토마토는 팔렸지만, 이번에는 수익이 많지 않았어요. negative: 쉽지는 않았지만 토마토를 판매해 수익을 올렸어요. early_exit: positive: 토마토로 수익을 올리지 못했어요. 토마토가 버려지지 않았더라도 판매하기는 어려웠을 수도 있어요. diff --git a/config/locales/nb.yml b/config/locales/nb.yml index 689eaf8..2147141 100644 --- a/config/locales/nb.yml +++ b/config/locales/nb.yml @@ -69,7 +69,7 @@ nb: income: label: Inntekt positive: Du solgte tomaten din lokalt, noe som betyr at du tjente litt penger! - neutral: Du solgte tomaten din lokalt, noe som betyr at du tjente litt penger! + neutral: Tomaten din ble solgt, men det ble ikke mye fortjeneste denne gangen. negative: Det var ikke enkelt, men du klarte å selge tomaten din, noe som betyr at du tjente litt penger. early_exit: positive: Du tjente ikke penger på tomaten din – og selv om tomaten din ikke hadde gått til spille, kunne det ha vært vanskelig å selge den. diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 0efc16b..b95f0f2 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -68,7 +68,7 @@ nl: income: label: Inkomen positive: Je hebt je tomaat lokaal verkocht, dus je hebt wat geld verdiend! - neutral: Je hebt je tomaat lokaal verkocht, dus je hebt wat geld verdiend! + neutral: Je tomaat is verkocht, maar er zat deze keer weinig winst in. negative: Het was niet makkelijk, maar je hebt je tomaat toch weten te verkopen, dus je hebt wat geld verdiend. early_exit: positive: Je hebt geen geld verdiend aan je tomaat – en zelfs als je tomaat niet was verspild, was het misschien lastig geweest om hem te verkopen. diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 3c3c644..5fb252c 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -68,7 +68,7 @@ pl: income: label: Przychód positive: Twój pomidor został sprzedany na lokalnym rynku, co oznacza, że udało Ci się na nim zarobić! - neutral: Twój pomidor został sprzedany na lokalnym rynku, co oznacza, że udało Ci się na nim zarobić! + neutral: Twój pomidor został sprzedany, ale tym razem zysk był niewielki. negative: Droga była wyboista, ale pomidor został sprzedany i udało Ci się na nim zarobić. early_exit: positive: Nie udało Ci się zarobić na pomidorze – nawet gdyby nie wylądował w koszu, znalezienie na niego chętnych mogło być trudne. diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 655d956..c7f6332 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -68,7 +68,7 @@ pt: income: label: Rendimento positive: Vendeste o tomate localmente, por isso ganhaste algum dinheiro. - neutral: Vendeste o tomate localmente, por isso ganhaste algum dinheiro. + neutral: O teu tomate foi vendido, mas desta vez não deu muito lucro. negative: Não foi fácil, mas conseguiste vender o tomate, o que significa que ganhaste algum dinheiro. early_exit: positive: Não ganhaste dinheiro com o tomate e, mesmo que não tivesse acabado como resíduo, vendê-lo teria sido difícil. diff --git a/config/locales/ro.yml b/config/locales/ro.yml index a46f5b9..6799b25 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -69,7 +69,7 @@ ro: income: label: Venituri positive: Ai vândut roșia pe piața locală, ceea ce înseamnă că ai câștigat niște bani - neutral: Ai vândut roșia pe piața locală, ceea ce înseamnă că ai câștigat niște bani + neutral: Roșia ta a fost vândută, dar de data aceasta nu ai câștigat mare lucru. negative: Nu a fost ușor, dar ai reușit să vinzi roșia, ceea ce înseamnă că ai câștigat niște bani. early_exit: positive: Nu ai câștigat niciun ban cu roșia ta – și chiar dacă nu s-ar fi alterat, ar fi fost probabil dificil să o vinzi. diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 812ad2d..d1720f1 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -68,7 +68,7 @@ sk: income: label: Príjem positive: Paradajku si predal/-a na miestnom trhu, takže si aj zarobil/-a nejaké peniaze! - neutral: Paradajku si predal/-a na miestnom trhu, takže si aj zarobil/-a nejaké peniaze! + neutral: Paradajku sa podarilo predať, ale tentoraz z toho nebol veľký zisk. negative: Nebolo to ľahké, ale paradajku sa ti podarilo predať, takže si aj zarobil/-a nejaké peniaze. early_exit: positive: Za svoju paradajku si nezarobil/-a žiadne peniaze – a aj keby paradajka nebola skončila ako odpad, mohlo byť ťažké predať ju. diff --git a/config/locales/sl.yml b/config/locales/sl.yml index e95c475..a8bc076 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -68,7 +68,7 @@ sl: income: label: Prihodki positive: Paradižnik si prodal/-a na lokalnem trgu, kar pomeni, da si zaslužil/-a nekaj denarja! - neutral: Paradižnik si prodal/-a na lokalnem trgu, kar pomeni, da si zaslužil/-a nekaj denarja! + neutral: Paradižnik je bil prodan, a tokrat zaslužek ni bil velik. negative: Ni bilo enostavno, ampak ti je uspelo prodati paradižnik, kar pomeni, da si zaslužil/-a nekaj denarja. early_exit: positive: S svojim paradižnikom nisi zaslužil/-a nič denarja – in tudi če se paradižnik ne bi pokvaril, bi ga bilo težko prodati. diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 41dc273..bd0aa6e 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -68,7 +68,7 @@ sr: income: label: Prihod positive: Prodao/la si svoj paradajz lokalno, što znači da si zaradio/la novac! - neutral: Prodao/la si svoj paradajz lokalno, što znači da si zaradio/la novac! + neutral: Tvoj paradajz je prodat, ali ovog puta zarada nije bila velika. negative: Nije bilo lako, ali uspeo/la si da prodaš svoj paradajz, što znači da si zaradio/la nešto novca. early_exit: positive: Nisi zaradio/la novac za svoj paradajz – a čak i da ti paradajz nije propao, prodaja bi mogla teško da ide. diff --git a/config/locales/sv.yml b/config/locales/sv.yml index a3bd308..666788d 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -68,7 +68,7 @@ sv: income: label: Inkomst positive: Du sålde din tomat lokalt, vilket innebär att du tjänade lite pengar! - neutral: Du sålde din tomat lokalt, vilket innebär att du tjänade lite pengar! + neutral: Din tomat såldes, men det blev inte mycket vinst den här gången. negative: Det var inte lätt, men du lyckades sälja din tomat, vilket innebär att du tjänade lite pengar. early_exit: positive: Du tjänade inga pengar på din tomat – och även om din tomat inte hade blivit förstörd, hade det kanske varit svårt att sälja den. diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 5394979..2bb2a6a 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -69,7 +69,7 @@ uk: income: label: Дохід positive: Ви продали помідор на місцевому ринку й заробили трохи грошей! - neutral: Ви продали помідор на місцевому ринку й заробили трохи грошей! + neutral: Ви продали помідор, але цього разу прибуток був невеликий. negative: Це було нелегко, але вам вдалося продати свій помідор, щоб заробити трохи грошей. early_exit: positive: Ви нічого не заробили на своєму помідорі — і навіть якби він не зіпсувався, продати його, напевно, було б непросто. diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 9ecc831..85fb541 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -68,7 +68,7 @@ zh: income: label: 收入 positive: 你把番茄卖给了当地商家,这意味着你赚了点钱! - neutral: 你把番茄卖给了当地商家,这意味着你赚了点钱! + neutral: 番茄卖出去了,但这次没赚到多少钱。 negative: 虽然不容易,但你成功卖掉了番茄,这意味着你赚了一些钱。 early_exit: positive: 你的番茄没给你带来任何收入——即使你的番茄没有被浪费掉,卖出去也可能很困难。 diff --git a/config/question_scores.json b/config/question_scores.json index 1f049ff..c085cdf 100644 --- a/config/question_scores.json +++ b/config/question_scores.json @@ -24,7 +24,7 @@ { "type": "good_answer", "overall": 1, - "impact": { "food_waste": 1, "emissions": 1, "income": 0 } + "impact": { "food_waste": 1, "emissions": 2, "income": 0 } } ] } @@ -41,7 +41,7 @@ { "type": "bad_answer", "overall": 0, - "impact": { "food_waste": -1, "emissions": -1, "income": 0 } + "impact": { "food_waste": -1, "emissions": -2, "income": 0 } }, { "type": "chance", @@ -80,7 +80,7 @@ { "type": "good_answer", "overall": 1, - "impact": { "food_waste": 2, "emissions": 0, "income": 0 } + "impact": { "food_waste": 2, "emissions": 1, "income": 0 } }, { "type": "bad_answer", @@ -111,7 +111,7 @@ { "type": "good_answer", "overall": 1, - "impact": { "food_waste": 1, "emissions": 2, "income": 0 } + "impact": { "food_waste": 2, "emissions": 2, "income": 0 } }, { "type": "bad_answer", @@ -134,7 +134,7 @@ { "type": "good_answer", "overall": 2, - "impact": { "food_waste": 1, "emissions": 2, "income": 2 } + "impact": { "food_waste": 1, "emissions": 1, "income": 2 } }, { "type": "chance", @@ -142,7 +142,7 @@ { "type": "good_answer", "overall": 1, - "impact": { "food_waste": 1, "emissions": 0, "income": 2 } + "impact": { "food_waste": 1, "emissions": 1, "income": 2 } }, { "type": "bad_answer",