Commit cba7cbc5 authored by Jared Sexton's avatar Jared Sexton
Browse files

Updating Question Class

parent 77a9a9cc
......@@ -12,7 +12,7 @@ int main() {
Questions questionList;
for(int i = 1; i <= 10; i++ ) {
questionList.determineQuestion(i);
questionList. mainQuestionAsk(i);
cout << "Level Up!\n";
}
......
......@@ -10,11 +10,7 @@
#include <ctime> // For time(0)
using namespace std;
void Questions::mainQuestionAsk(int level) {
}
bool Questions::determineQuestion(int level) {
bool Questions::mainQuestionAsk(int level) {
if((level >= 1) && (level <= 3)) {
return countingQuestion(level);
}
......@@ -45,7 +41,7 @@ bool Questions::countingQuestion(int level) {
break;
}
int answer;
countTo++;
countTo++; //To set the possible range to 1 -> maximum, instead of 0 -> (maximum -1)
for(int i = 0; i < countTo; i++) {
if(countTo % 2 == 0)
cout << "X ";
......
......@@ -2,6 +2,7 @@
Question class header file
Jared Sexton
============================================================================
Currently, questions are configured for levels 1 through 10.
*/
......@@ -10,9 +11,9 @@
class Questions {
public:
void mainQuestionAsk(int level);
bool determineQuestion(int level);
// Asks the proper question based on the player's level.
// It returns true if they answered correctly, and false if not.
bool mainQuestionAsk(int level);
// Asks a question, returns true if the kid was right, false if they were wrong.
bool countingQuestion(int level);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment