Right now, we’re asking the player to choose playing with odds or evens. This choice determines the computer’s side and the round winner.
To be able to use the player choice in the game, we need to store it in a variable.
🎓 Learn
For now, let’s assume the player choice is always 1
(odds) and declare the variable to store it:
✅ What to Do
✏️ Program.cs - Changes
// Player chooses to play with odds or evens.
GamePrint.Input("Choose 1 for Odds or 2 for Evens");
GameInput.Number(1, 2);
++ int playerSide = 1;🗒️ Program.cs - Final
GamePrint.Box("Welcome to the Odds and Evens Game!");
// Player chooses to play with odds or evens.
GamePrint.Input("Choose 1 for Odds or 2 for Evens");
GameInput.Number(1, 2);
int playerSide = 1;
(...)