I just wanted to do something interesting and simple. The thought of this game had been running in my mind for a long time I wanted to develop a gamified approach towards learning. Learning from books is really boring no one likes reading books. Using games as a method to learn could really be revolutionary!

What it does

It is a quiz game that randomly generates 5 different countries and asks you to enter their capital cities. You will get +3 in your score for every correct answer and -1 for every wrong answer. It also displays the answer if you want to know what the answer is.

How I built it

I used 2 different arrays to store the Countries and their Capitals with the same indexes. Then I used Math.random() in a range of 0-20(converted to int explicitly) to get random indexes. Then check these indexes with the arrays storing the Capitals and compare them with the user's answers. Then for every correct answer, the user gets a +3 and for every wrong, the user gets a -1.

Challenges I ran into

Equating Math.random() I was often getting duplicates. Removing that required a while loops and working on a GUI every textfield was associated with a different variable name so I couldn't use loops for calculations and printing. Also, I used a GUI for outputs,i.e, JFramework which was kind of hard to work with I couldn't run loops because of the output and input being from different variables.

Accomplishments that I'm proud of

I am proud of my total project it came out exactly I wanted it to. I would be really proud if I see my Idea bring about a revolution in the world!

What I learned

I learned a whole lot about countries and their capitals doing while the researching for it.

Built With

Share this project: