{(click: ?cl)[(if: $cl_index is $cyclinglink.length - 1)[(set: $cl_index = 0)](else:)[(set: $cl_index += 1)](replace: ?cl)[(print: $cyclinglink[$cl_index])](replace: ?cl_macro)[(display: "cyclinglink")]]} <span class="status time"><i class="fa fa-clock-o"></i> <strong>(print: "Day " + (text: $date's day))</strong>&emsp;(if: $date's dow > 6)[(set: $date's dow -= 7)](print: $dows[(text: $date's dow)] +", " + $date's month + " " + (text: $date's date)) &mdash; (hook: "time_hook")[]</span><span class="status money"><i class="fa fa-money"></i> `$`$money</span><span class="status snap"><i class="fa fa-credit-card"></i> `$`$snap</span><span class="status units-food"><i class="fa fa-cutlery"></i> (print: $meal_units)</span><span class="status units-instant"><i class="fa fa-fast-forward"></i> (print: $pantry_curr's instant)</span><span class="status health">You feel <strong>normal</strong>.</span>(replace: ?time_hook)[(display: "time")]{(set: $income to 200)(set: $rent to 60)(set: $dows to (array: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"))(set: $date to (datamap: "dow", 6, "month", "Mar", "date", 1, "day", 1))(set: $time to (datamap: "hour", 10, "minute", 0))(set: $quota to (datamap: "calories", 14000, "carbs", 25, "protein", 10, "dairy", 10, "fruitveg", 30, "fatsoils", 5, "sleep", 56))(set: $eaten to (datamap: "calories", 0, "carbs", 0, "protein", 0, "dairy", 0, "fruitveg", 0, "fatsoils", 0, "sleep", 0))(set: $pantry_base to (datamap: "carbs", 0, "protein", 0, "dairy", 0, "fruitveg", 0, "fatsoils", 0, "instant", 0))(set: $pantry_curr to (datamap: "carbs", 0, "protein", 0, "dairy", 0, "fruitveg", 0, "fatsoils", 0, "instant", 0))(set: $pantry_frac to (datamap: "carbs", 0, "protein", 0, "dairy", 0, "fruitveg", 0, "fatsoils", 0))(set: $quota_kids to (datamap: "calories", 14000, "carbs", 25, "protein", 10, "dairy", 10, "fruitveg", 30, "fatsoils", 5))(set: $eaten_kids to (datamap: "calories", 0, "carbs", 0, "protein", 0, "dairy", 0, "fruitveg", 0, "fatsoils", 0))(set: $money to 0)(set: $snap to 360)(set: $happiness to 0)(set: $health to 0)(set: $states to (array: "normal"))(set: $alarm to 7)(set: $cpu to (datamap: "carbs", 250, "protein", 200, "dairy", 200, "fruitveg", 60, "fatsoils", 390, "instant", 200))(set: $ppu to (datamap: "carbs", 0.1, "protein", 1.26, "dairy", 1.06, "fruitveg", 0.98, "fatsoils", 0.18, "instant", 0.52))(set: $meal_units to 0)(set: $quota_diff to (datamap: "calories", 0, "carbs", 0, "protein", 0, "dairy", 0, "fruitveg", 0, "fatsoils", 0, "sleep", 0))(set: $quota_kidsdiff to (datamap: "calories", 0, "carbs", 0, "protein", 0, "dairy", 0, "fruitveg", 0, "fatsoils", 0))}{(if: $time's minute >= 60)[(set: $time's hour += 1)(set: $time's minute -= 60)](if: $time's hour > 12)[(print: $time's hour - 12)](else:)[(print: $time's hour)]:(if: $time's minute is 0)[00](else:)[(print: $time's minute)] (if: $time's hour > 11)[PM](else:)[AM]}{(display: "init")(set: $cyclinglink to (array: "2,891 households", "6.7% of households"))(set: $cl_index to 0)<div class="intro"><h4>According to the 2013 American Community Survey,</h4><h3>[(print: $cyclinglink[$cl_index])]<cl|</h3><h4>in Cambridge received food stamp benefits through the</h4><h3><span>Supplemental Nutrition<br>Assistance Program.</span></h3> <h4><span>SNAP</span> provides low income Americans with money to help pay for food.</h4><h4>But even with government assistance, these people face tough choices.</h4>[]<cl_macro|(replace: ?cl_macro)[(display: "cyclinglink")]<h4 class="invitation">Can you make the right</h4><h3 class="title">SNAP Judgments?</h3><h4>[[Play to find out &rarr;->application]]</h4></div>}<div class="intro">Just write in your name, make sure everything is correct, and your application will be all good to go:</div> <div class="application"><img src="http://i.imgur.com/8EbYlk5.png"><div class="title"><h6>Massachusetts Department of Transitional Assistance</h6><h4>SNAP Benefits Application</h4></div><form><label class="header">I. Information About You and Your Family</label><div class="section"><input type="text" name="name" value=""><label>Name</label></div><div class="section"><input type="text" name="dob" value="05/16/84" readonly><label>Date of Birth</label></div><div class="section"><input type="text" name="citystate" value="Cambridge, MA" readonly><label>City/State</label></div><div class="section"><input type="text" name="marital" value="Single" readonly><label>Marital Status</label></div><div class="section"><input type="text" name="children" value="2" readonly><label>Number of Children</label></div><div class="section hidden"></div><label class="header">II. Information About Your Employment</label><div class="section"><input type="text" name="employer" value="Happy Homes, Inc." readonly><label>Employer</label></div><div class="section"><input type="text" name="jobtitle" value="House Cleaner" readonly><label>Job Title</label></div><div class="section"><input type="text" name="wage" value="$200" readonly><label>Weekly Wage</label></div><label class="header">III. Information About Your Housing</label><div class="section"><input type="text" name="address" value="14C Jackson Park" readonly><label>Address</label></div><div class="section"><input type="text" name="housingtype" value="Subsidized" readonly><label>Type of Housing</label></div><div class="section"><input type="text" name="rent" value="$60" readonly><label>Weekly Rent</label></div></form>(link-goto: "<img src='http://i.imgur.com/imiBkFb.png'>", "day1")</div>You collect your weekly income of <span class="income">`$`$income</span>. You pay your landlord <span class="rent">`$`$rent</span> in rent for the week.{(set: $money += ($income - $rent))(display: "status")} (display: "income") It's the start of a new month, so you get <span class="snap">`$`$snap</span> in SNAP money. Remember, this can only be used for food purchases at participating stores. It's the weekend, so you don't have to go to work. Do you: [[Go grocery shopping->weekend_grocery]] [[Work a second job->weekend_work]] [[Spend time with the kids->weekend_kids]](display: "status") Your pantry is looking a bit bare, so you decide to go grocery shopping. There are a few places you can go: Right down the street is the corner store. It's definitely the cheapest and fastest place to go, but they don't really have a great selection. Not too far away, there's a fancy organic grocery store. It's kind of expensive, but at least you'll be getting quality food! The farmer's market is also reasonably close, but it's cheap <em>and</em> healthy &mdash; they don't accept SNAP though. There's a big supermarket that has everything at decent prices. Sadly, it's a bit of a trek and you'll have to take public transportation to get there. [[Corner store->weekend_corner]] [[Organic grocery store->weekend_organic]] [[Big supermarket->weekend_super]] [[Farmer's market->weekend_farmer]]{(set: $money += 40)(set: $date's day += 1)(set: $date's dow to 0)(set: $date's date += 1)(set: $time's hour to 23)(set: $time's minute to 0)(display: "status")(set: $cyclinglink to (array: 6, 7, 8))(set: $cl_index to 0)(set: $happiness -= 1)(set: $sleeptime to $time's hour + $time's minute/60)} Money is tight, so you decide to spend the weekend (either: "picking up extra shifts at work", "babysitting", "doing yard work", "washing cars", "moving furniture", "waiting tables", "working a temp job", "selling plasma"). You manage to make <span class="income">`$`40</span>, but you're too tired to do anything else once you get home and decide to go straight to bed. You have work at 9 AM tomorrow; before that, you have to eat breakfast and get your kids to school. You set your alarm for [(print: $cyclinglink[$cl_index])]<cl| in the morning. [[Go to bed->weekday_alarm]] []<cl_macro|(replace: ?cl_macro)[(display: "cyclinglink")]{(set: $date's day += 1)(set: $date's dow += 1)(set: $date's date += 1)(set: $time's hour to $cyclinglink[$cl_index])(set: $time's minute to 0)(display: "status")} Your alarm goes off, but you are still tired and want to rest more before your long day of work. Would you like to: (if: $time's hour is 8)[<span class="disabled">Hit snooze and keep sleeping</span>](else:)[[[[Hit snooze and keep sleeping->weekday_snooze]]]<choice_0|] [[Wake up->weekday_up]] { (set: $time_elapsed to 0) (replace: ?time_hook)[(display: "time")] (if: $time's hour < 8)[(live: 3s)[(set: $time_elapsed += 15)(set: $time's minute += 15)(replace: ?time_hook)[(display: "time")](if: $time's hour is 8)[(replace: "?choice_0")[<span class="disabled">Hit snooze and keep sleeping</span>](stop:)]]] }{(set: $time's minute += 60)(if: $time's minute > 60)[(set: $time's hour += 1)(set: $time's minute -= 60)](if: $time's hour is 8 and $time's minute > 0 or $time's hour > 8)[(set: $time's hour to 8)(set: $time's minute to 0)](set: $eaten's sleep += 24 - $sleeptime + $time's hour + $time's minute/60)(display: "status")} (print: $dows[(text: $date's dow)] + "s") are the worst. You hit the snooze button and sleep some more. After drifting in and out of sleep for some time, you finally wake up. (if: $time's hour is 8)[Oh crap. At this rate you're going to be late for work. No time for breakfast.](if: $time's hour is 7 and $time's minute != 0)[You check the time. You probably don't have time to cook a proper breakfast, but you could eat something quick or a meal you prepared in advance. Or you could go out and get breakfast from the nearby fast food joint. ](if: $time's hour is 7 and $time's minute is 0 or $time's hour < 7)[It's still pretty early. You even have time to make breakfast! [[Get up and make breakfast->weekday_cook]]] (if: $time's hour <= 7)[[[Eat something quick or prepared in advance->weekday_eat]] [[Go out to get breakfast->weekday_eatout]]] [[Skip breakfast, drop the kids off, and head to work->weekday_work]]{(if: $money >= 40)[(set: $money -= 40)](else:)[(set: $money to 0)](set: $date's day += 1)(set: $date's dow to 0)(set: $date's date += 1)(set: $time's hour to 23)(set: $time's minute to 0)(display: "status")(set: $cyclinglink to (array: 6, 7, 8))(set: $cl_index to 0)(set: $happiness += 1)(set: $sleeptime to $time's hour + $time's minute/60)} You don't really have anything important to do this weekend, so you spend some time with your kids. You take them (either: "bowling", "to the movies", "to the aquarium", "shopping for new clothes", "out for dinner") and have a great time. Overall, you spent (if: $money > 0)[about <span class="rent">`$`40</span>](else:)[<span class="rent">the rest of your money</span>], but it was a weekend well spent. Once you get home, you go to bed almost immediately. You have work at 9 AM tomorrow; before that, you have to eat breakfast and get your kids to school. You set your alarm for [(print: $cyclinglink[$cl_index])]<cl| in the morning. [[Go to bed->weekday_alarm]] []<cl_macro|(replace: ?cl_macro)[(display: "cyclinglink")]{(set: $time's hour += 3)(set: $time's minute += 30)(display: "status")} You get back home in the early afternoon &mdash; if you leave home now, you might be able to find a side job to make some money over the rest of the weekend. Alternatively, you could take your kids somewhere nice. They <em>did</em> go with you to the grocery store, after all. You also have all this brand-new fresh food! You could spend the rest of the afternoon cooking some meals for the upcoming week. [[[Find a job->weekend_work]]]<choice_0| [[[Go out with your kids->weekend_kids]]]<choice_1| [[[Cook some meals->weekend_cook]]]<choice_2| [[Sit at home and relax->weekend_sunday]] { (set: $time_elapsed to 0) (set: $choices to (array: "Find a job", "Go out with your kids", "Cook some meals", "Sit at home and relax")) (replace: ?time_hook)[(display: "time")] (live: 3s)[(set: $time_elapsed += 30)(set: $time's minute += 30)(replace: ?time_hook)[(display: "time")](replace: "?choice_" + (text: (floor: ($time_elapsed / 60)) - 1))[<span class="disabled">(print: $choices[(text: (floor: ($time_elapsed / 60)) - 1)])</span>](if: $time's hour is 17)[(stop:)]] }{(set: $eaten's sleep += 24 - $sleeptime + $time's hour + $time's minute/60)(display: "status")} Upon hearing your alarm, you immediately sit up. (if: $time's hour is 8)[You probably should have set your alarm for earlier, though. At this rate you're going to be late for work. No time for breakfast.](if: $time's hour is 7 and $time's minute != 0)[You check the time. You probably don't have time to cook a proper breakfast, but you could eat something quick or a meal you prepared in advance. Or you could go out and grab breakfast from the local fast food place. ](if: $time's hour is 7 and $time's minute is 0 or $time's hour < 7)[It's still pretty early. You even have time to make breakfast! [[Get up and make breakfast->weekday_cook]]] (if: $time's hour <= 7)[[[Eat something quick or prepared in advance->weekday_eat]] [[Go out to get breakfast->weekday_eatout]]] [[Skip breakfast, drop the kids off, and head to work->weekday_work]]{(display: "status")(set: $cyclinglink to (array: "None", "A very small amount", "A small amount", "A medium amount", "A large amount", "A very large amount"))(set: $cl0_index to 0)(set: $cl1_index to 0)(set: $cl2_index to 0)(set: $cl3_index to 0)(set: $cl4_index to 0)(set: $cl5_index to 0)(set: $grocery_ratio to 1)} You go down the street to go to your friendly neighborhood corner store. It's mostly junk food &mdash; various prepackaged meals, ramen noodles, snacks, and chips. At least this food is quick to make and will never go bad. How much are you going to buy? <strong>Instant meals:</strong> [(print: $cyclinglink[$cl5_index])]<cl5| Your total comes out to <span class="rent">`$`[0]<total|</span>. [Pay with <span class="income">cash</span>]<cash| [Pay with <span class="snap">SNAP</span>]<snap| (click: ?cash)[(if: $money >= $total)[(set: $money -= $total)(replace: ?ap_macro)[(display: "add_pantry")]](elseif: $snap + $money >= $total)[(set: $money to 0)(set: $snap -= ($total - $money))(replace: ?ap_macro)[(display: "add_pantry")]](goto: "weekend_corner2")] (click: ?snap)[(if: $snap >= $total)[(set: $snap -= $total)(replace: ?ap_macro)[(display: "add_pantry")]](elseif: $snap + $money >= $total)[(set: $snap to 0)(set: $money -= ($total - $snap))(replace: ?ap_macro)[(display: "add_pantry")]](goto: "weekend_corner2")] []<ap_macro| []<cg_macro| []<cl_macro|(replace: ?cl_macro)[(display: "cyclinglink_grocery")]{(set: $time's minute += 30)(display: "status")(set: $cyclinglink to (array: "None", "A very small amount", "A small amount", "A medium amount", "A large amount", "A very large amount"))(set: $cl0_index to 0)(set: $cl1_index to 0)(set: $cl2_index to 0)(set: $cl3_index to 0)(set: $cl4_index to 0)(set: $cl5_index to 0)(set: $grocery_ratio to 1.5)} You decide to splurge this week. You hop on a bus and go to the organic grocery store. How much are you going to buy? `(Remember: certain foods will spoil over time!)` <strong>Carbs:</strong> [(print: $cyclinglink[$cl0_index])]<cl0| <strong>Protein:</strong> [(print: $cyclinglink[$cl1_index])]<cl1| <strong>Dairy:</strong> [(print: $cyclinglink[$cl2_index])]<cl2| <strong>Fruits/Vegetables:</strong> [(print: $cyclinglink[$cl3_index])]<cl3| <strong>Fats/Oils:</strong> [(print: $cyclinglink[$cl4_index])]<cl4| Your total comes out to <span class="rent">`$`[0]<total|</span>. [Pay with <span class="income">cash</span>]<cash| [Pay with <span class="snap">SNAP</span>]<snap| (click: ?cash)[(if: $money >= $total)[(set: $money -= $total)(replace: ?ap_macro)[(display: "add_pantry")]](elseif: $snap + $money >= $total)[(set: $money to 0)(set: $snap -= ($total - $money))(replace: ?ap_macro)[(display: "add_pantry")]](goto: "weekend_organic2")] (click: ?snap)[(if: $snap >= $total)[(set: $snap -= $total)(replace: ?ap_macro)[(display: "add_pantry")]](elseif: $snap + $money >= $total)[(set: $snap to 0)(set: $money -= ($total - $snap))(replace: ?ap_macro)[(display: "add_pantry")]](goto: "weekend_organic2")] []<ap_macro| []<cg_macro| []<cl_macro|(replace: ?cl_macro)[(display: "cyclinglink_grocery")]{(set: $time's hour += 1)(display: "status")(set: $cyclinglink to (array: "None", "A very small amount", "A small amount", "A medium amount", "A large amount", "A very large amount"))(set: $cl0_index to 0)(set: $cl1_index to 0)(set: $cl2_index to 0)(set: $cl3_index to 0)(set: $cl4_index to 0)(set: $cl5_index to 0)(set: $grocery_ratio to 1.2)} It's quite the journey, but you make your way to the big supermarket to load up on groceries. You make sure to load up on sale items to get the best deals. How much are you going to buy? `(Remember: certain foods will spoil over time!)` <strong>Carbs:</strong> [(print: $cyclinglink[$cl0_index])]<cl0| <strong>Protein:</strong> [(print: $cyclinglink[$cl1_index])]<cl1| <strong>Dairy:</strong> [(print: $cyclinglink[$cl2_index])]<cl2| <strong>Fruits/Vegetables:</strong> [(print: $cyclinglink[$cl3_index])]<cl3| <strong>Fats/Oils:</strong> [(print: $cyclinglink[$cl4_index])]<cl4| <strong>Instant Foods:</strong> [(print: $cyclinglink[$cl5_index])]<cl5| Your total comes out to <span class="rent">`$`[0]<total|</span>. [Pay with <span class="income">cash</span>]<cash| [Pay with <span class="snap">SNAP</span>]<snap| (click: ?cash)[(if: $money >= $total)[(set: $money -= $total)(replace: ?ap_macro)[(display: "add_pantry")]](elseif: $snap + $money >= $total)[(set: $money to 0)(set: $snap -= ($total - $money))(replace: ?ap_macro)[(display: "add_pantry")]](goto: "weekend_sunday")] (click: ?snap)[(if: $snap >= $total)[(set: $snap -= $total)(replace: ?ap_macro)[(display: "add_pantry")]](elseif: $snap + $money >= $total)[(set: $snap to 0)(set: $money -= ($total - $snap))(replace: ?ap_macro)[(display: "add_pantry")]](goto: "weekend_sunday")] []<ap_macro| []<cg_macro| []<cl_macro|(replace: ?cl_macro)[(display: "cyclinglink_grocery")]{(set: $time's hour += 1)(display: "status")(set: $cyclinglink to (array: "None", "A very small amount", "A small amount", "A medium amount", "A large amount", "A very large amount"))(set: $cl0_index to 0)(set: $cl1_index to 0)(set: $cl2_index to 0)(set: $cl3_index to 0)(set: $cl4_index to 0)(set: $cl5_index to 0)(set: $grocery_ratio to 1)} It's quite the journey, but you make your way to the farmer's market to get cheap fresh food. How much are you going to buy? `(Remember: certain foods will spoil over time!)` <strong>Carbs:</strong> [(print: $cyclinglink[$cl0_index])]<cl0| <strong>Protein:</strong> [(print: $cyclinglink[$cl1_index])]<cl1| <strong>Dairy:</strong> [(print: $cyclinglink[$cl2_index])]<cl2| <strong>Fruits/Vegetables:</strong> [(print: $cyclinglink[$cl3_index])]<cl3| <strong>Fats/Oils:</strong> [(print: $cyclinglink[$cl4_index])]<cl4| Your total comes out to <span class="rent">`$`[0]<total|</span>. [Pay with <span class="income">cash</span>]<cash| (click: ?cash)[(if: $money >= $total)[(set: $money -= $total)(replace: ?ap_macro)[(display: "add_pantry")]](goto: "weekend_sunday")] []<ap_macro| []<cg_macro| []<cl_macro|(replace: ?cl_macro)[(display: "cyclinglink_grocery")]{(set: $time's hour += 1)(display: "status")} Well, that was a pretty quick trip. You basically still have the whole weekend free! What do you want to do with the rest of your time? [[Work a second job->weekend_work]] [[Spend time with the kids->weekend_kids]] (if: ($pantry_base's carbs + $pantry_base's protein + $pantry_base's dairy + $pantry_base's fruitveg + $pantry_base's fatsoils) > 0)[[[Get a headstart on cooking for the week->weekend_cook]]]{ (click: ?cl0)[(if: $cl0_index is $cyclinglink.length - 1)[(set: $cl0_index = 0)](else:)[(set: $cl0_index += 1)](replace: ?cl0)[(print: $cyclinglink[$cl0_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] (click: ?cl1)[(if: $cl1_index is $cyclinglink.length - 1)[(set: $cl1_index = 0)](else:)[(set: $cl1_index += 1)](replace: ?cl1)[(print: $cyclinglink[$cl1_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] (click: ?cl2)[(if: $cl2_index is $cyclinglink.length - 1)[(set: $cl2_index = 0)](else:)[(set: $cl2_index += 1)](replace: ?cl2)[(print: $cyclinglink[$cl2_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] (click: ?cl3)[(if: $cl3_index is $cyclinglink.length - 1)[(set: $cl3_index = 0)](else:)[(set: $cl3_index += 1)](replace: ?cl3)[(print: $cyclinglink[$cl3_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] (click: ?cl4)[(if: $cl4_index is $cyclinglink.length - 1)[(set: $cl4_index = 0)](else:)[(set: $cl4_index += 1)](replace: ?cl4)[(print: $cyclinglink[$cl4_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] (click: ?cl5)[(if: $cl5_index is $cyclinglink.length - 1)[(set: $cl5_index = 0)](else:)[(set: $cl5_index += 1)](replace: ?cl5)[(print: $cyclinglink[$cl5_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] }{ (click: ?cl0)[(if: $cl0_index is $cyclinglink.length - 1)[(set: $cl0_index = 0)](else:)[(set: $cl0_index += 1)](replace: ?cl0)[(print: $cyclinglink[$cl0_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] (click: ?cl1)[(if: $cl1_index is $cyclinglink.length - 1)[(set: $cl1_index = 0)](else:)[(set: $cl1_index += 1)](replace: ?cl1)[(print: $cyclinglink[$cl1_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] (click: ?cl2)[(if: $cl2_index is $cyclinglink.length - 1)[(set: $cl2_index = 0)](else:)[(set: $cl2_index += 1)](replace: ?cl2)[(print: $cyclinglink[$cl2_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] (click: ?cl3)[(if: $cl3_index is $cyclinglink.length - 1)[(set: $cl3_index = 0)](else:)[(set: $cl3_index += 1)](replace: ?cl3)[(print: $cyclinglink[$cl3_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] (click: ?cl4)[(if: $cl4_index is $cyclinglink.length - 1)[(set: $cl4_index = 0)](else:)[(set: $cl4_index += 1)](replace: ?cl4)[(print: $cyclinglink[$cl4_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] (click: ?cl5)[(if: $cl5_index is $cyclinglink.length - 1)[(set: $cl5_index = 0)](else:)[(set: $cl5_index += 1)](replace: ?cl5)[(print: $cyclinglink[$cl5_index])](replace: ?cg_macro)[(display: "calc_grocery")](replace: ?total)[(text: $total)](replace: ?cl_macro)[(display: "cyclinglink_grocery")]] }{(set: $st0 to ($cl0_index*10+20)*$ppu's carbs)(set: $st1 to ($cl1_index*5)*$ppu's protein)(set: $st2 to ($cl2_index*10)*$ppu's dairy)(set: $st3 to ($cl3_index*10+10)*$ppu's fruitveg)(set: $st4 to ($cl4_index*5)*$ppu's fatsoils)(set: $st5 to ($cl5_index*5)*$ppu's instant)(set: $total to (round: $grocery_ratio*($st0 + $st1 + $st2 + $st3 + $st4 + $st5)))}{(set: $date's day += 1)(set: $date's dow to 0)(set: $date's date += 1)(set: $time's hour to 23)(set: $time's minute to 0)(display: "status")(set: $cyclinglink to (array: 6, 7, 8))(set: $cl_index to 0)(set: $sleeptime to $time's hour + $time's minute/60)} You spend Saturday evening (either: "surfing the internet", "catching up on TV shows", "watching the game", "reading", "playing with your children at home", "hanging out with a friend", "going over your budget"). On Sunday, you spend the entire day running errands. Before you know it, the weekend is over. It's nighttime and you're getting ready for bed. You have work at 9 AM tomorrow; before that, you have to eat breakfast and get your kids to school. You set your alarm for [(print: $cyclinglink[$cl_index])]<cl| in the morning. [[Go to bed->weekday_alarm]] []<cl_macro|(replace: ?cl_macro)[(display: "cyclinglink")]{(set: $pantry_base's carbs += ($cl0_index*10+20))(set: $pantry_base's protein += ($cl1_index*5))(set: $pantry_base's dairy += ($cl2_index*10))(set: $pantry_base's fruitveg += ($cl3_index*10+10))(set: $pantry_base's fatsoils += ($cl4_index*5))(set: $pantry_base's instant += ($cl5_index*5))(set: $pantry_curr to $pantry_base)(set: $pantry_total to $pantry_base's carbs + $pantry_base's protein + $pantry_base's dairy + $pantry_base's fruitveg + $pantry_base's fatsoils)(set: $pantry_frac's carbs to $pantry_base's carbs/$pantry_total)(set: $pantry_frac's protein to $pantry_base's protein/$pantry_total)(set: $pantry_frac's dairy to $pantry_base's dairy/$pantry_total)(set: $pantry_frac's fruitveg to $pantry_base's fruitveg/$pantry_total)(set: $pantry_frac's fatsoils to $pantry_base's fatsoils/$pantry_total)}{(set: $units_cooked to (round: ((17 - ($time's hour + .5 * ($time's minute / 30)))*60 - 30)/3))(set: $max_units to $pantry_base's carbs + $pantry_base's protein + $pantry_base's dairy + $pantry_base's fruitveg + $pantry_base's fatsoils)(set: $meal_units to (min: $units_cooked, $max_units))(set: $time's hour to 17)(set: $time's minute to 0)(set: $pantry_curr's carbs -= $meal_units*($pantry_frac's carbs))(set: $pantry_curr's protein -= $meal_units*($pantry_frac's protein))(set: $pantry_curr's dairy -= $meal_units*($pantry_frac's dairy))(set: $pantry_curr's fruitveg -= $meal_units*($pantry_frac's fruitveg))(set: $pantry_curr's fatsoils -= $meal_units*($pantry_frac's fatsoils))(display: "status")} Inspired by your grocery trip, you decide to spend the rest of the afternoon in the kitchen. (if: (min: $units_cooked, $max_units) is 0)[Unfortunately, you didn't have enough time or ingredients to cook anything substantial.](else:)[You are able to cook (min: $units_cooked, $max_units) units of food. That's about (round: (min: $units_cooked, $max_units)/4) full meals.] [[Wind down for the evening->weekend_sunday]]{(set: $units_cooked to (round: ((7.5 - ($time's hour + .5 * ($time's minute / 30)))*60 - 30)/3))(set: $max_units to $pantry_curr's carbs + $pantry_curr's protein + $pantry_curr's dairy + $pantry_curr's fruitveg + $pantry_curr's fatsoils)(set: $meal_units += (min: $units_cooked, $max_units))(set: $time's hour to 7)(set: $time's minute to 30)(set: $pantry_curr's carbs -= (min: $units_cooked, $max_units)*$pantry_frac's carbs)(set: $pantry_curr's protein -= (min: $units_cooked, $max_units)*$pantry_frac's protein)(set: $pantry_curr's dairy -= (min: $units_cooked, $max_units)*$pantry_frac's dairy)(set: $pantry_curr's fruitveg -= (min: $units_cooked, $max_units)*$pantry_frac's fruitveg)(set: $pantry_curr's fatsoils -= (min: $units_cooked, $max_units)*$pantry_frac's fatsoils)(display: "status")} (if: (min: $units_cooked, $max_units) is 0)[Unfortunately, you didn't have enough time or ingredients to cook.](else:)[Waking up early means you had time to cook (min: $units_cooked, $max_units) units of food. That's about (round: (min: $units_cooked, $max_units)/4) meals' worth.] Now it's time to eat! (if: $meal_units >= 10)[[Have a full family breakfast with your children (<span class="rent">10 units</span>)]<fullfamily| ](if: $meal_units >= 6)[[Give your children breakfast instead of yourself (<span class="rent">6 units</span>)]<fullchildren| ](if: $meal_units >= 5)[[Have a small family breakfast with your children (<span class="rent">5 units</span>)]<smallfamily| ](if: $meal_units >= 4)[[Eat breakfast by yourself (<span class="rent">4 units</span>)]<fullself| ](if: $pantry_curr's instant >= 10)[[(either: "Pancakes", "Waffles", "Cereal", "Toaster pastries", "Muffins") for breakfast! (<span class="rent">10 units</span>)]<instant_fullfamily| ](if: $pantry_curr's instant >= 6)[[Make the kids (either: "pancakes", "waffles", "cereal", "toaster pastries", "muffins") (<span class="rent">6 units</span>)]<instant_fullchildren| ](if: $pantry_curr's instant >= 4)[[Make yourself a (either: "pancake", "waffle", "bowl of cereal", "toaster pastry", "muffin") (<span class="rent">4 units</span>)]<instant_fullself| ][[You change your mind and go out to eat->weekday_eatout]] [[You change your mind and skip breakfast altogether->weekday_work]] {(click: ?fullfamily)[(set: $meal_units -= 10)(display: "calc_fullfamily")(goto: "weekday_work")](click: ?fullchildren)[(set: $meal_units -= 6)(display: "calc_fullchildren")(goto: "weekday_work")](click: ?smallfamily)[(set: $meal_units -= 5)(display: "calc_smallfamily")(goto: "weekday_work")](click: ?fullself)[(set: $meal_units -= 4)(display: "calc_fullself")(goto: "weekday_work")](click: ?instant_fullfamily)[(set: $pantry_curr's instant -= 10)(display: "instant_fullfamily")(goto: "weekday_work")](click: ?instant_fullchildren)[(set: $pantry_curr's instant -= 6)(display: "instant_fullchildren")(goto: "weekday_work")](click: ?instant_fullself)[(set: $pantry_curr's instant -= 4)(display: "instant_fullself")(goto: "weekday_work")]}(display: "status") You look inside your pantry and fridge. (if: $meal_units >= 4)[Good thing you cooked in advance.] (if: $pantry_curr's instant >= 4)[You also have some processed foods you bought from the grocery store.] What sounds good? (if: $meal_units >= 10)[[Have a full family breakfast with your children (<span class="rent">10 units</span>)]<fullfamily| ](if: $meal_units >= 6)[[Give your children breakfast instead of yourself (<span class="rent">6 units</span>)]<fullchildren| ](if: $meal_units >= 5)[[Have a small family breakfast with your children (<span class="rent">5 units</span>)]<smallfamily| ](if: $meal_units >= 4)[[Eat breakfast by yourself (<span class="rent">4 units</span>)]<fullself| ](if: $pantry_curr's instant >= 10)[[(either: "Pancakes", "Waffles", "Cereal", "Toaster pastries", "Muffins") for breakfast! (<span class="rent">10 units</span>)]<instant_fullfamily| ](if: $pantry_curr's instant >= 6)[[Make the kids (either: "pancakes", "waffles", "cereal", "toaster pastries", "muffins") (<span class="rent">6 units</span>)]<instant_fullchildren| ](if: $pantry_curr's instant >= 4)[[Make yourself a (either: "pancake", "waffle", "bowl of cereal", "toaster pastry", "muffin") (<span class="rent">4 units</span>)]<instant_fullself| ][[You change your mind and go out to eat->weekday_eatout]] [[You change your mind and skip breakfast altogether->weekday_work]] {(click: ?fullfamily)[(set: $meal_units -= 10)(display: "calc_fullfamily")(goto: "weekday_work")](click: ?fullchildren)[(set: $meal_units -= 6)(display: "calc_fullchildren")(goto: "weekday_work")](click: ?smallfamily)[(set: $meal_units -= 5)(display: "calc_smallfamily")(goto: "weekday_work")](click: ?fullself)[(set: $meal_units -= 4)(display: "calc_fullself")(goto: "weekday_work")](click: ?instant_fullfamily)[(set: $pantry_curr's instant -= 10)(display: "instant_fullfamily")(goto: "weekday_work")](click: ?instant_fullchildren)[(set: $pantry_curr's instant -= 6)(display: "instant_fullchildren")(goto: "weekday_work")](click: ?instant_fullself)[(set: $pantry_curr's instant -= 4)(display: "instant_fullself")(goto: "weekday_work")]}(display: "status") You decide to get breakfast from the fast food restaurant. You order items from the dollar menu to keep the price as low as possible. (if: $money >= 5)[[Have a full family breakfast with your children (<span class="rent">`$`5</span>)]<eatout_fullfamily| ](if: $money >= 3)[[Buy your children breakfast but not yourself (<span class="rent">`$`3</span>)]<eatout_fullchildren| ](if: $money >= 2)[[Buy yourself breakfast but not your children (<span class="rent">`$`2</span>)]<eatout_fullself| ](if: $money >= 2)[[Split a couple of items between the three of you (<span class="rent">`$`2</span>)]<eatout_smallfamily| ][[You change your mind and skip breakfast altogether->weekday_work]] {(click: ?eatout_fullfamily)[(set: $money -= 5)(display: "instant_fullfamily")(goto: "weekday_work")](click: ?eatout_fullchildren)[(set: $money -= 3)(display: "instant_fullchildren")(goto: "weekday_work")](click: ?eatout_fullself)[(set: $money -= 2)(display: "instant_fullself")(goto: "weekday_work")](click: ?eatout_smallfamily)[(set: $money -= 2)(display: "instant_smallfamily")(goto: "weekday_work")]}{(set: $time's hour to 12)(set: $time's minute to 0)(display: "status")} You drop your kids off at school and rush to your job, getting there just as your shift starts. You have a busy morning, filled with physically demanding work, and you are excited to take a break during lunch. What would you like to eat? (if: $meal_units >= 4)[[Eat the full lunch you brought from home (<span class="rent">4 units</span>)]<fullself| ](if: $meal_units >= 2)[[Eat the half lunch you brought from home (<span class="rent">2 units</span>)]<smallself| ](if: $money >= 5)[[Get (either: "pizza", "a burger", "a cheeseburger", "nachos", "onion rings", "a hot dog", "fried chicken", "something") from the fast food restaurant next door (<span class="rent">`$`5</span>)]<instant_fullself| ](if: $money >= 10)[[Get a balanced meal from the restaurant down the street (<span class="rent">`$`10</span>)]<eatout_fullself| ][You skip lunch and take on an extra shift (<span class="income">`$`10</span>)]<skip_lunch| {(click: ?fullself)[(set: $meal_units -= 4)(display: "calc_fullself")(goto: "weekday_predinner")](click: ?smallself)[(set: $meal_units -= 2)(display: "calc_smallself")(goto: "weekday_predinner")](click: ?instant_fullself)[(set: $money -= 5)(display: "instant_fullself")(goto: "weekday_predinner")](click: ?eatout_fullself)[(set: $money -= 10)(display: "calc_fullself")(goto: "weekday_predinner")](click: ?skip_lunch)[(set: $money += 10)(goto: "weekday_predinner")]}{(display: "calc_fullself")(display: "calc_fullchildren")}{(display: "instant_fullself")(display: "instant_fullchildren")}{(set: $eaten_kids's calories += 6 * ($cpu's carbs * $pantry_frac's carbs + $cpu's protein * $pantry_frac's protein + $cpu's dairy * $pantry_frac's dairy + $cpu's fruitveg * $pantry_frac's fruitveg + $cpu's fatsoils * $pantry_frac's fatsoils)(set: $eaten_kids's carbs += 6 * $pantry_frac's carbs)(set: $eaten_kids's protein += 6 * $pantry_frac's protein)(set: $eaten_kids's dairy += 6 * $pantry_frac's dairy)(set: $eaten_kids's fruitveg += 6 * $pantry_frac's fruitveg)(set: $eaten_kids's fatsoils += 6 * $pantry_frac's fatsoils)}{(set: $eaten's calories += 4 * ($cpu's carbs * $pantry_frac's carbs + $cpu's protein * $pantry_frac's protein + $cpu's dairy * $pantry_frac's dairy + $cpu's fruitveg * $pantry_frac's fruitveg + $cpu's fatsoils * $pantry_frac's fatsoils)(set: $eaten's carbs += 4 * $pantry_frac's carbs)(set: $eaten's protein += 4 * $pantry_frac's protein)(set: $eaten's dairy += 4 * $pantry_frac's dairy)(set: $eaten's fruitveg += 4 * $pantry_frac's fruitveg)(set: $eaten's fatsoils += 4 * $pantry_frac's fatsoils)}{(set: $eaten's calories += 2 * ($cpu's carbs * $pantry_frac's carbs + $cpu's protein * $pantry_frac's protein + $cpu's dairy * $pantry_frac's dairy + $cpu's fruitveg * $pantry_frac's fruitveg + $cpu's fatsoils * $pantry_frac's fatsoils)(set: $eaten's carbs += 2 * $pantry_frac's carbs)(set: $eaten's protein += 2 * $pantry_frac's protein)(set: $eaten's dairy += 2 * $pantry_frac's dairy)(set: $eaten's fruitveg += 2 * $pantry_frac's fruitveg)(set: $eaten's fatsoils += 2 * $pantry_frac's fatsoils)(set: $eaten_kids's calories += 3 * ($cpu's carbs * $pantry_frac's carbs + $cpu's protein * $pantry_frac's protein + $cpu's dairy * $pantry_frac's dairy + $cpu's fruitveg * $pantry_frac's fruitveg + $cpu's fatsoils * $pantry_frac's fatsoils)(set: $eaten_kids's carbs += 3 * $pantry_frac's carbs)(set: $eaten_kids's protein += 3 * $pantry_frac's protein)(set: $eaten_kids's dairy += 3 * $pantry_frac's dairy)(set: $eaten_kids's fruitveg += 3 * $pantry_frac's fruitveg)(set: $eaten_kids's fatsoils += 3 * $pantry_frac's fatsoils)}{(set: $eaten_kids's calories += $cpu's instant * 6)}{(set: $eaten's calories += $cpu's instant * 4)}{(set: $eaten's calories += $cpu's instant * 2)(set: $eaten_kids's calories += $cpu's instant * 3)}{(set: $eaten's calories += 2 * ($cpu's carbs * $pantry_frac's carbs + $cpu's protein * $pantry_frac's protein + $cpu's dairy * $pantry_frac's dairy + $cpu's fruitveg * $pantry_frac's fruitveg + $cpu's fatsoils * $pantry_frac's fatsoils)(set: $eaten's carbs += 2 * $pantry_frac's carbs)(set: $eaten's protein += 2 * $pantry_frac's protein)(set: $eaten's dairy += 2 * $pantry_frac's dairy)(set: $eaten's fruitveg += 2 * $pantry_frac's fruitveg)(set: $eaten's fatsoils += 2 * $pantry_frac's fatsoils)}{(set: $time's hour to 18)(set: $time's minute to 0)(display: "status")} After an exhausting afternoon, you leave work and pick up your kids from their afterschool program. You are tired and want to relax, but they are energetic and excited to play with you. When you get home, what do you do? [[[Start cooking dinner->weekday_dinner]]]<choice_0| [[[Help your kids with homework->weekday_kids1]]]<choice_1| [[Unwind with some TV->weekday_unwind1]] { (set: $time_elapsed to 0) (set: $choices to (array: "Start cooking dinner", "Help your kids with homework", "Unwind with some TV")) (replace: ?time_hook)[(display: "time")] (live: 3s)[(set: $time_elapsed += 30)(set: $time's minute += 30)(replace: ?time_hook)[(display: "time")](replace: "?choice_" + (text: (floor: ($time_elapsed / 60)) - 1))[<span class="disabled">(print: $choices[(text: (floor: ($time_elapsed / 60)) - 1)])</span>](if: $time's hour is 20)[(stop:)]] }{(set: $units_cooked to (round: ((20 - ($time's hour + .5 * ($time's minute / 30)))*60 - 30)/3))(set: $max_units to $pantry_curr's carbs + $pantry_curr's protein + $pantry_curr's dairy + $pantry_curr's fruitveg + $pantry_curr's fatsoils)(set: $meal_units += (min: $units_cooked, $max_units))(set: $time's hour to 8)(set: $time's minute to 0)(set: $pantry_curr's carbs -= (min: $units_cooked, $max_units)*$pantry_frac's carbs)(set: $pantry_curr's protein -= (min: $units_cooked, $max_units)*$pantry_frac's protein)(set: $pantry_curr's dairy -= (min: $units_cooked, $max_units)*$pantry_frac's dairy)(set: $pantry_curr's fruitveg -= (min: $units_cooked, $max_units)*$pantry_frac's fruitveg)(set: $pantry_curr's fatsoils -= (min: $units_cooked, $max_units)*$pantry_frac's fatsoils)(display: "status")} (if: (min: $units_cooked, $max_units) is 0)[You ran out of ingredients and/or time to cook dinner! Guess you're eating out tonight (or eating something from the freezer).](else:)[You were able to whip up (min: $units_cooked, $max_units) units of food. That's about (round: (min: $units_cooked, $max_units)/4) meals' worth. Let's dig in!] (if: $meal_units >= 10)[[Have a full family dinner with your children (<span class="rent">10 units</span>)]<fullfamily| ](if: $meal_units >= 6)[[Give your children dinner instead of yourself (<span class="rent">6 units</span>)]<fullchildren| ](if: $meal_units >= 5)[[Have a small family dinner with your children (<span class="rent">5 units</span>)]<smallfamily| ](if: $meal_units >= 4)[[Eat dinner by yourself (<span class="rent">4 units</span>)]<fullself| ](if: $pantry_curr's instant >= 10)[[Reheat frozen dinners for the whole family (<span class="rent">10 units</span>)]<instant_fullfamily| ](if: $pantry_curr's instant >= 6)[[Give the children frozen dinners (<span class="rent">6 units</span>)]<instant_fullchildren| ](if: $pantry_curr's instant >= 4)[[Make yourself a frozen dinner (<span class="rent">4 units</span>)]<instant_fullself| ](if: $money >= 10)[[Eat at a fast food restaurant (<span class="rent">`$`10</span>)]<eatoutff_fullfamily| ](if: $money >= 40)[[Eat at a nicer restaurant (<span class="rent">`$`40</span>)]<eatoutgd_fullfamily| ][[Skip dinner altogether->weekday_postdinner]] {(click: ?fullfamily)[(set: $meal_units -= 10)(display: "calc_fullfamily")(goto: "weekday_postdinner")](click: ?fullchildren)[(set: $meal_units -= 6)(display: "calc_fullchildren")(goto: "weekday_postdinner")](click: ?smallfamily)[(set: $meal_units -= 5)(display: "calc_smallfamily")(goto: "weekday_postdinner")](click: ?fullself)[(set: $meal_units -= 4)(display: "calc_fullself")(goto: "weekday_postdinner")](click: ?instant_fullfamily)[(set: $pantry_curr's instant -= 10)(display: "instant_fullfamily")(goto: "weekday_postdinner")](click: ?instant_fullchildren)[(set: $pantry_curr's instant -= 6)(display: "instant_fullchildren")(goto: "weekday_postdinner")](click: ?smallfamily)[(set: $pantry_curr's instant -= 5)(display: "instant_smallfamily")(goto: "weekday_postdinner")](click: ?instant_fullself)[(set: $pantry_curr's instant -= 4)(display: "instant_fullself")(goto: "weekday_postdinner")](click: ?eatoutff_fullfamily)[(set: $money -= 10)(display: "instant_fullfamily")(goto: "weekday_postdinner")](click: ?eatoutgd_fullfamily)[(set: $money -= 40)(set: $happiness += 2)(display: "calc_fullfamily")(goto: "weekday_postdinner")]} {(set: $time's hour to 8)(set: $time's minute to 0)(set: $happiness += 1)(display: "status")} You spend a couple of hours tutoring your children and helping them with (either: "science", "math", "english", "social studies", "biology", "chemistry", "physics", "algebra", "history", "geography") homework. You feel like you haven't done this as much lately. Before you know it, it's time for dinner. What will you be having? (if: $meal_units >= 10)[[Have a full family dinner with your children (<span class="rent">10 units</span>)]<fullfamily| ](if: $meal_units >= 6)[[Give your children dinner instead of yourself (<span class="rent">6 units</span>)]<fullchildren| ](if: $meal_units >= 5)[[Have a small family dinner with your children (<span class="rent">5 units</span>)]<smallfamily| ](if: $meal_units >= 4)[[Eat dinner by yourself (<span class="rent">4 units</span>)]<fullself| ](if: $pantry_curr's instant >= 10)[[Reheat frozen dinners for the whole family (<span class="rent">10 units</span>)]<instant_fullfamily| ](if: $pantry_curr's instant >= 6)[[Give the children frozen dinners (<span class="rent">6 units</span>)]<instant_fullchildren| ](if: $pantry_curr's instant >= 4)[[Make yourself a frozen dinner (<span class="rent">4 units</span>)]<instant_fullself| ](if: $money >= 10)[[Eat at a fast food restaurant (<span class="rent">`$`10</span>)]<eatoutff_fullfamily| ](if: $money >= 40)[[Eat at a nicer restaurant (<span class="rent">`$`40</span>)]<eatoutgd_fullfamily| ][[Skip dinner altogether->weekday_postdinner]] {(click: ?fullfamily)[(set: $meal_units -= 10)(display: "calc_fullfamily")(goto: "weekday_postdinner")](click: ?fullchildren)[(set: $meal_units -= 6)(display: "calc_fullchildren")(goto: "weekday_postdinner")](click: ?smallfamily)[(set: $meal_units -= 5)(display: "calc_smallfamily")(goto: "weekday_postdinner")](click: ?fullself)[(set: $meal_units -= 4)(display: "calc_fullself")(goto: "weekday_postdinner")](click: ?instant_fullfamily)[(set: $pantry_curr's instant -= 10)(display: "instant_fullfamily")(goto: "weekday_postdinner")](click: ?instant_fullchildren)[(set: $pantry_curr's instant -= 6)(display: "instant_fullchildren")(goto: "weekday_postdinner")](click: ?smallfamily)[(set: $pantry_curr's instant -= 5)(display: "instant_smallfamily")(goto: "weekday_postdinner")](click: ?instant_fullself)[(set: $pantry_curr's instant -= 4)(display: "instant_fullself")(goto: "weekday_postdinner")](click: ?eatoutff_fullfamily)[(set: $money -= 10)(display: "instant_fullfamily")(goto: "weekday_postdinner")](click: ?eatoutgd_fullfamily)[(set: $money -= 40)(set: $happiness += 2)(display: "calc_fullfamily")(goto: "weekday_postdinner")]}{(set: $time's hour to 8)(set: $time's minute to 0)(set: $happiness += 2)(display: "status")} You are so exhausted from work, all you want to do is turn on the TV and zone out. You manage to catch the latest episode of your favorite sitcom, but after it's over you spend a good hour watching bad reality shows. Your kids start complaining that they’re hungry. It's probably a good time to eat: (if: $meal_units >= 10)[[Have a full family dinner with your children (<span class="rent">10 units</span>)]<fullfamily| ](if: $meal_units >= 6)[[Give your children dinner instead of yourself (<span class="rent">6 units</span>)]<fullchildren| ](if: $meal_units >= 5)[[Have a small family dinner with your children (<span class="rent">5 units</span>)]<smallfamily| ](if: $meal_units >= 4)[[Eat dinner by yourself (<span class="rent">4 units</span>)]<fullself| ](if: $pantry_curr's instant >= 10)[[Reheat frozen dinners for the whole family (<span class="rent">10 units</span>)]<instant_fullfamily| ](if: $pantry_curr's instant >= 6)[[Give the children frozen dinners (<span class="rent">6 units</span>)]<instant_fullchildren| ](if: $pantry_curr's instant >= 4)[[Make yourself a frozen dinner (<span class="rent">4 units</span>)]<instant_fullself| ](if: $money >= 10)[[Eat at a fast food restaurant (<span class="rent">`$`10</span>)]<eatoutff_fullfamily| ](if: $money >= 40)[[Eat at a nicer restaurant (<span class="rent">`$`40</span>)]<eatoutgd_fullfamily| ][[Skip dinner altogether->weekday_postdinner]] {(click: ?fullfamily)[(set: $meal_units -= 10)(display: "calc_fullfamily")(goto: "weekday_postdinner")](click: ?fullchildren)[(set: $meal_units -= 6)(display: "calc_fullchildren")(goto: "weekday_postdinner")](click: ?smallfamily)[(set: $meal_units -= 5)(display: "calc_smallfamily")(goto: "weekday_postdinner")](click: ?fullself)[(set: $meal_units -= 4)(display: "calc_fullself")(goto: "weekday_postdinner")](click: ?instant_fullfamily)[(set: $pantry_curr's instant -= 10)(display: "instant_fullfamily")(goto: "weekday_postdinner")](click: ?instant_fullchildren)[(set: $pantry_curr's instant -= 6)(display: "instant_fullchildren")(goto: "weekday_postdinner")](click: ?smallfamily)[(set: $pantry_curr's instant -= 5)(display: "instant_smallfamily")(goto: "weekday_postdinner")](click: ?instant_fullself)[(set: $pantry_curr's instant -= 4)(display: "instant_fullself")(goto: "weekday_postdinner")](click: ?eatoutff_fullfamily)[(set: $money -= 10)(display: "instant_fullfamily")(goto: "weekday_postdinner")](click: ?eatoutgd_fullfamily)[(set: $money -= 40)(set: $happiness += 2)(display: "calc_fullfamily")(goto: "weekday_postdinner")]}{(set: $time's hour += 1)(set: $time's minute to 0)(display: "status")} (if: $time's hour < 23)[You’re done with dinner and have a little bit of time before your kids have to be in bed.](else:)[The children have gone to bed. You are tired, but you could probably stay up a bit longer.] What would you like to do? [[Cook something for lunch tomorrow->weekday_cooknight]] (if: $time's hour < 23)[[[(either: "Read a book to", "Play a game with", "Have a talk with") your children->weekday_kids2]]] [[Relax and watch TV by yourself->weekday_unwind2]] [[Get ready for bed and go to sleep->weekday_sleep]]{(set: $time's hour += 2)(set: $happiness += 2)(display: "status")} You kick back and watch more TV. You tune in for a (either: "late night talk show", "new political drama you've read all about online", "rerun of your favorite show from the '90s", "series of weirdly satisfying infomercials", "nature documentary", "game show", "non-sequitur children's cartoon"). [[Finish watching->weekday_postdinner]]{(set: $units_cooked to (round: ((($time's hour + 2) - ($time's hour + .5 * ($time's minute / 30)))*60 - 30)/3))(set: $max_units to $pantry_curr's carbs + $pantry_curr's protein + $pantry_curr's dairy + $pantry_curr's fruitveg + $pantry_curr's fatsoils)(set: $meal_units += (min: $units_cooked, $max_units))(set: $time's hour += 2)(set: $time's minute to 0)(set: $pantry_curr's carbs -= (min: $units_cooked, $max_units)*$pantry_frac's carbs)(set: $pantry_curr's protein -= (min: $units_cooked, $max_units)*$pantry_frac's protein)(set: $pantry_curr's dairy -= (min: $units_cooked, $max_units)*$pantry_frac's dairy)(set: $pantry_curr's fruitveg -= (min: $units_cooked, $max_units)*$pantry_frac's fruitveg)(set: $pantry_curr's fatsoils -= (min: $units_cooked, $max_units)*$pantry_frac's fatsoils)(display: "status")} You spend some time cooking meals for the rest of the week. (if: (min: $units_cooked, $max_units) is 0)[Unfortunately, you seem to have run out of ingredients and/or time.](else:)[You cooked (min: $units_cooked, $max_units) units of food. That's about (round: (min: $units_cooked, $max_units)/4) meals' worth. Hopefully it'll last you for a while.] Two hours later, you decide to take a break from cooking. [[Return to the living room->weekday_postdinner]]{(set: $time's hour += 2)(set: $happiness += 1)(display: "status")} You spend time playing with your children. Most of the time you're too busy with work to interact with them, so they appreciate the gesture. Two hours later, the once-energetic kids are starting to wane. You declare that it's bedtime. [[Tuck them into bed->weekday_postdinner]]{(display: "status")(set: $cyclinglink to (array: 6, 7, 8))(set: $cl_index to 0)(set: $sleeptime to $time's hour + $time's minute/60)} After a long and tiring day, you decide to call it a night. (if: $date's dow is 5)[It's finally the end of another week. At least you don't have to go to work tomorrow.](else:)[As always, you have to report to work at 9 AM tomorrow. You set your alarm for [(print: $cyclinglink[$cl_index])]<cl| in the morning.] (if: $date's dow is 5)[[[Go to bed->weekend_calcs]]](else:)[[[Go to bed->weekday_alarm2]] []<cl_macro|(replace: ?cl_macro)[(display: "cyclinglink")]]{(set: $date's day += 2)(set: $date's dow += 2)(set: $date's date += 2)(set: $time's hour to $cyclinglink[$cl_index])(set: $time's minute to 0)(display: "status")} Your alarm goes off, but you are still tired and want to rest more before your long day of work. Would you like to: (if: $time's hour is 8)[<span class="disabled">Hit snooze and keep sleeping</span>](else:)[[[[Hit snooze and keep sleeping->weekday_snooze]]]<choice_0|] [[Wake up->weekday_up]] { (set: $time_elapsed to 0) (replace: ?time_hook)[(display: "time")] (if: $time's hour < 8)[(live: 3s)[(set: $time_elapsed += 15)(set: $time's minute += 15)(replace: ?time_hook)[(display: "time")](if: $time's hour is 8)[(replace: "?choice_0")[<span class="disabled">Hit snooze and keep sleeping</span>](stop:)]]] }{(set: $money += $income - $rent)(set: $meal_units to 0)(set: $eaten's calories to (round: $eaten's calories * 7/3))(set: $eaten's carbs to (round: $eaten's carbs * 7/3))(set: $eaten's protein to (round: $eaten's protein * 7/3))(set: $eaten's dairy to (round: $eaten's dairy * 7/3))(set: $eaten's fruitveg to (round: $eaten's fruitveg * 7/3))(set: $eaten's fatsoils to (round: $eaten's fatsoils * 7/3))(set: $eaten's sleep to (round: $eaten's sleep * 7/3))(set: $eaten_kids's calories to (round: $eaten_kids's calories * 7/3))(set: $eaten_kids's carbs to (round: $eaten_kids's carbs * 7/3))(set: $eaten_kids's protein to (round: $eaten_kids's protein * 7/3))(set: $eaten_kids's dairy to (round: $eaten_kids's dairy * 7/3))(set: $eaten_kids's fruitveg to (round: $eaten_kids's fruitveg * 7/3))(set: $eaten_kids's fatsoils to (round: $eaten_kids's fatsoils * 7/3))(set: $pantry_base's protein to 0)(set: $pantry_base's dairy to 0)(set: $pantry_base's fruitveg to 0)(set: $quota_diff to (datamap: "calories", (sign: $eaten's calories - $quota's calories), "carbs", (sign: $eaten's carbs - $quota's carbs), "protein", (sign: $eaten's protein - $quota's protein), "dairy", (sign: $eaten's dairy - $quota's dairy), "fruitveg", (sign: $eaten's fruitveg - $quota's fruitveg), "fatsoils", (sign: $eaten's fatsoils - $quota's fatsoils), "sleep", (sign: $eaten's sleep - $quota's sleep)))(set: $quota_kids_kidsdiff to (datamap: "calories", (sign: $eaten's calories - $quota's calories), "carbs", (sign: $eaten_kids's carbs - $quota_kids's carbs), "protein", (sign: $eaten_kids's protein - $quota_kids's protein), "dairy", (sign: $eaten_kids's dairy - $quota_kids's dairy), "fruitveg", (sign: $eaten_kids's fruitveg - $quota_kids's fruitveg), "fatsoils", (sign: $eaten_kids's fatsoils - $quota_kids's fatsoils)))(set: $date's day += 1)(set: $date's dow to 6)(set: $time's hour to 10)(set: $time's minute to 0)(display: "status")} (display: "income") Any remaining precooked meals in your fridge have gone bad, as have any leftover protein, dairy, and fruit/vegetable products. {(set: $scores to (array: $quota_diff's calories, $quota_diff's carbs, $quota_diff's protein, $quota_diff's dairy, $quota_diff's fruitveg, $quota_diff's fatsoils, $quota_diff's sleep)) (if: (count: $scores, -1) > 3)[<strong>You didn't make it through the month.</strong> Refresh the window to try again.] (else:)[[[Go grocery shopping->weekend_grocery]] [[Work a second job->weekend_work]] [[Spend time with the kids->weekend_kids]]] (if: (count: $scores, -1) > 1)[(set: $health -= 1)] }