| @ -0,0 +1 @@ | |||||
| <svg xmlns="http://www.w3.org/2000/svg" width="22" height="21" viewBox="0 0 22 21"><path d="M21.75,6.8l-2-3.5V.25H2.25v3.05L.25,6.8v.2c0,.98.38,1.86,1,2.53v10.47c0,.41.34.75.75.75h18c.41,0,.75-.34.75-.75v-10.47c.62-.67,1-1.55,1-2.53v-.2ZM3.75,3.7v-1.95h14.5v1.95l1.99,3.49c-.09,1.15-1.06,2.06-2.24,2.06-1.24,0-2.25-1.01-2.25-2.25h-1.5c0,1.64-1.99,2.25-3.25,2.25s-3.25-.61-3.25-2.25h-1.5c0,1.24-1.01,2.25-2.25,2.25s-2.15-.91-2.24-2.06l1.99-3.49ZM2.75,19.25v-8.73c.39.14.81.23,1.25.23,1.26,0,2.38-.63,3.06-1.59,1.82,2.08,6.06,2.08,7.88,0,.68.96,1.8,1.59,3.06,1.59.44,0,.86-.09,1.25-.23v8.73H2.75ZM5,15.75h5v1.5h-5v-1.5Z"/></svg> | |||||
| @ -0,0 +1 @@ | |||||
| <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22"><path d="M21.91,6.57h0s-3.28-6.57-3.28-6.57H3.36L.08,6.56h0c-.05.11-.09.22-.09.34v14.33c0,.42.34.77.77.77h20.47c.42,0,.77-.34.77-.77V6.91c0-.12-.04-.24-.09-.34ZM19.99,6.14h-8.22V1.53h5.92l2.3,4.6ZM4.31,1.53h5.92v4.6H2.01L4.31,1.53ZM20.47,20.47H1.53V7.67h18.93v12.79ZM14.07,11.77h-6.14v-1.53h6.14v1.53Z"/></svg> | |||||
| @ -0,0 +1 @@ | |||||
| <svg xmlns="http://www.w3.org/2000/svg" width="22" height="18" viewBox="0 0 22 18"><path d="M21.6,7.58h.01s-3.5-5.01-3.5-5.01c-.14-.2-.37-.32-.61-.32h-3.25v-1.25c0-.41-.34-.75-.75-.75H1c-.2,0-.39.08-.53.22s-.22.33-.22.53v14c0,.41.34.75.75.75h2.37c.33,1.15,1.38,2,2.63,2s2.3-.85,2.63-2h4.73c.33,1.15,1.38,2,2.63,2s2.3-.85,2.63-2h2.37c.41,0,.75-.34.75-.75v-7c0-.16-.06-.3-.15-.42ZM17.11,3.75l2.45,3.5h-5.31v-3.5h2.86ZM6,16.25c-.69,0-1.25-.56-1.25-1.25s.56-1.25,1.25-1.25,1.25.56,1.25,1.25-.56,1.25-1.25,1.25ZM16,16.25c-.69,0-1.25-.56-1.25-1.25s.56-1.25,1.25-1.25,1.25.56,1.25,1.25-.56,1.25-1.25,1.25ZM20.25,14.25h-1.62c-.33-1.15-1.38-2-2.63-2s-2.3.85-2.63,2h-4.73c-.33-1.15-1.38-2-2.63-2s-2.3.85-2.63,2h-1.62V1.75s11,0,11,0v6.25c0,.41.34.75.75.75h6.75v5.5ZM8.25,5h1.5v4h-1.5v-4ZM4.25,5h1.5v4h-1.5v-4Z"/></svg> | |||||
| @ -0,0 +1,168 @@ | |||||
| { | |||||
| "stages": [ | |||||
| { | |||||
| "id": "soil", | |||||
| "answers": [ | |||||
| { | |||||
| "type": "good_answer", | |||||
| "overall": 2, | |||||
| "impact": { "food_waste": 1, "emissions": 1, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "bad_answer", | |||||
| "overall": 0, | |||||
| "impact": { "food_waste": 0, "emissions": -2, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "chance", | |||||
| "outcomes": [ | |||||
| { | |||||
| "type": "good_answer", | |||||
| "overall": 1, | |||||
| "impact": { "food_waste": 1, "emissions": 2, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "good_answer", | |||||
| "overall": 1, | |||||
| "impact": { "food_waste": 1, "emissions": 1, "income": 0 } | |||||
| } | |||||
| ] | |||||
| } | |||||
| ] | |||||
| }, | |||||
| { | |||||
| "id": "water", | |||||
| "answers": [ | |||||
| { | |||||
| "type": "good_answer", | |||||
| "overall": 2, | |||||
| "impact": { "food_waste": 1, "emissions": 1, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "bad_answer", | |||||
| "overall": 0, | |||||
| "impact": { "food_waste": -1, "emissions": -1, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "chance", | |||||
| "outcomes": [ | |||||
| { | |||||
| "type": "good_answer", | |||||
| "overall": 1, | |||||
| "impact": { "food_waste": 1, "emissions": 2, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "bad_answer", | |||||
| "overall": 0, | |||||
| "impact": { "food_waste": -3, "emissions": -1, "income": 0 }, | |||||
| "early_exit": true | |||||
| } | |||||
| ] | |||||
| } | |||||
| ] | |||||
| }, | |||||
| { | |||||
| "id": "storage", | |||||
| "answers": [ | |||||
| { | |||||
| "type": "good_answer", | |||||
| "overall": 2, | |||||
| "impact": { "food_waste": 2, "emissions": 1, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "bad_answer", | |||||
| "overall": 0, | |||||
| "impact": { "food_waste": -2, "emissions": 0, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "chance", | |||||
| "outcomes": [ | |||||
| { | |||||
| "type": "good_answer", | |||||
| "overall": 1, | |||||
| "impact": { "food_waste": 2, "emissions": 0, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "bad_answer", | |||||
| "overall": 0, | |||||
| "impact": { "food_waste": -3, "emissions": -1, "income": 0 }, | |||||
| "early_exit": true | |||||
| } | |||||
| ] | |||||
| } | |||||
| ] | |||||
| }, | |||||
| { | |||||
| "id": "transport", | |||||
| "answers": [ | |||||
| { | |||||
| "type": "good_answer", | |||||
| "overall": 2, | |||||
| "impact": { "food_waste": 2, "emissions": -1, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "bad_answer", | |||||
| "overall": 0, | |||||
| "impact": { "food_waste": 0, "emissions": -2, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "chance", | |||||
| "outcomes": [ | |||||
| { | |||||
| "type": "good_answer", | |||||
| "overall": 1, | |||||
| "impact": { "food_waste": 1, "emissions": 2, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "bad_answer", | |||||
| "overall": 0, | |||||
| "impact": { "food_waste": -3, "emissions": -1, "income": 0 }, | |||||
| "early_exit": true | |||||
| } | |||||
| ] | |||||
| } | |||||
| ] | |||||
| }, | |||||
| { | |||||
| "id": "market", | |||||
| "answers": [ | |||||
| { | |||||
| "type": "good_answer", | |||||
| "overall": 2, | |||||
| "impact": { "food_waste": 1, "emissions": 2, "income": 2 } | |||||
| }, | |||||
| { | |||||
| "type": "bad_answer", | |||||
| "overall": 2, | |||||
| "impact": { "food_waste": 1, "emissions": 2, "income": 2 } | |||||
| }, | |||||
| { | |||||
| "type": "bad_answer", | |||||
| "overall": 1, | |||||
| "impact": { "food_waste": 1, "emissions": 1, "income": 1 } | |||||
| }, | |||||
| { | |||||
| "type": "bad_answer", | |||||
| "overall": 0, | |||||
| "impact": { "food_waste": 1, "emissions": 0, "income": -1 } | |||||
| } | |||||
| ] | |||||
| } | |||||
| ], | |||||
| "last_save": { | |||||
| "answers": [ | |||||
| { | |||||
| "type": "good_answer", | |||||
| "result_type": "compost", | |||||
| "overall": 0, | |||||
| "impact": { "food_waste": 1, "emissions": 1, "income": 0 } | |||||
| }, | |||||
| { | |||||
| "type": "bad_answer", | |||||
| "result_type": "landfill", | |||||
| "overall": 0, | |||||
| "impact": { "food_waste": -2, "emissions": -3, "income": 0 } | |||||
| } | |||||
| ] | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,5 @@ | |||||
| class AddScoresToPlayers < ActiveRecord::Migration[8.1] | |||||
| def change | |||||
| add_column :players, :scores, :jsonb, default: {}, null: false | |||||
| end | |||||
| end | |||||
| @ -0,0 +1,7 @@ | |||||
| class AddIsDoneToPlayers < ActiveRecord::Migration[8.1] | |||||
| def change | |||||
| add_column :players, :is_done, :boolean, default: false, null: false | |||||
| add_index :players, :is_done | |||||
| add_index :players, :locale | |||||
| end | |||||
| end | |||||