Skip to content

bbashcode/MathGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Problem Description

Create a 2-Player math game 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 should output 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 should announce who won and what the other player’s score is.

How to Play This Game

  • Make sure Ruby is installed on the target machine and the version is: ruby 3.1.++
  • Clone this repo locally
  • cd into the directory and on the command terminal type irb main.rb or ruby main.rb

Have fun!

Disclaimer

This is not a fully featured app. It is a small exercise to practice some Ruby chomps, uh chops I mean.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages