Socrates asks a student to walk through a wheat field.The student needs to choose the biggest ear of wheat.They can only move forward and cannot go back.If they pass a wheat, they lose the chance to choose it later.The student keeps waiting for a better one.In the end, they may miss the best choice or choose nothing.The story is about choice, uncertainty, regret, and decision-making.It also asks an important question:Should we keep searching for something better, or know when to stop?
Connection to the game:
The player has to choose between PICK and PASS without knowing what will come next.
The player has two choices:
Once the player passes a wheat, they cannot go back.
This is the main rule of the game and connects to the story of Socrates and choosing the biggest ear of wheat.
Game States
We used several Boolean variables to control different parts of the game.
var start = false;
let gameOver = false;
let passedAll = false;
start controls the start page.gameOver controls whether the player is still playing.passedAll checks if the player passed all six wheat.