JavaScript Solo Project: CS 105's Hunger Games

Due: Friday, Oct. 9th by 8:00pm

Introduction

The culmination of the first half of the semester is here as you become part
of CS 105's very own Hunger Games! In our version of The Hunger Games, you
will create a player that will compete using skill and wit aganist your
other classmates in a contest to be the last player standing.

Rules

Your player and all other players will be placed into an arena that we have
set up. Each and every day, your player will be paired up with every other
player and go on a hunt. The result of each hunt is shared between the two
players. For every one of these hunts, you must make a decision:

Hunt, to actively hunt for food while on the hunt

Hunting will cost you 6 food in energy

You will bring back 6 food from your hunt

Slack, to slack off instead of hunting while
on the hunt

Slacking off takes less energy and will only cost you 2 food

However, you will not bring back any food

Based on the decisions of you and your partner, there are four outcomes:

Your Decision

Partner's Decision

Result

Overall Impact

Hunt

Hunt

You both hunt, bringing back a total of 12 food.
After spliting the food, you each earned 6 food from the hunt.
Both you and your partner each spent 6 energy hunting so neither no better off than you were earlier.

You gained 0 food.
Your partner gained 0 food.

Hunt

Slack

You hunt but you found your partner slacked off.
As a result, only 6 food was gathered.
Since all food must be split, each of you get 3 food from the hunt.
After accounting for the 6 food you spent hunting, you lost a total of 3 food from the hunt.
Your partner only spent 2 food slacking off, so they gained 1 food as a result of your hard work.

You lost 3 food.
Your partner gained 1 food.

Slack

Hunt

You slack off but found out your partner hunted.
As a result, only 6 food was gathered.
Since all food must be split, each of you get 3 food from the hunt.
Since you spent only 2 food slacking off, you gain 1 food as a result of the hunt!
After accounting for the 6 food spent hunting, your partner lost a total of 3 food.

You gain 1 food.
Your partner lost 3 food.

Slack

Slack

You both slack off, gathering no food.
As a result, you both lose 2 food since no one did any real work.

You lost 2 food.
Your partner lost 2 food.

The Capital's Blessing

The Capital hates when people slack off!! To encourage hunting, at the
start of every day The Capital announces that if a certain percentage of players
actively hunt (as opposed to slacking off) they will bless everyone who hunted
with an extra +2 food for the hunter.

This Capital Blessing results in eight possible outcomes:

Your Decision

Partner's Decision

Impact with Capital Blessing

Impact without Capital Blessing

Hunt

Hunt

You gain 2 food.
Your partner gains 2 food.

You gain 0 food.
Your partner gains 0 food.

Hunt

Slack

You gain -1 food.
Your partner gains 1 food.

You gain -3 food.
Your partner gains 1 food.

Slack

Hunt

You gain 1 food.
Your partner gains -1 food.

You gain 1 food.
Your partner gains -3 food.

Slack

Slack

You gain -2 food.
Your partner gains -2 food.

You gain -2 food.
Your partner gains -2 food.

Final Rules

Each player will start out with a set amount of food. If a player's food
reaches 0, they are removed from the game. The winner is either the last
player left or the player with the most food after a large number of rounds.