A 2-Player CLI based math game written in Ruby, where players take turns to answer simple math addition problems. A new math question is generated for each turn by picking two numbers between 1 and 20. The player whose turn it is is prompted the question and must answer correctly or lose a life.
Both players start with 3 lives. They lose a life if they mis-answer a question. At the end of every turn, the game outputs the new scores for both players, so players know where they stand.
The game doesn’t end until one of the players loses all their lives. At this point, the game announces who won and what the other player’s score is.
Ruby v3.1.1