added new project
This commit is contained in:
1 parent
6e02fc4e7f
commit
90cfba2c6f
113 files changed
+974
-297
No files matched your search
@@ -0,0 +1,53 @@
|
||||
Chris Nutter
|
||||
Psuedocode
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
|
||||
At Startup:
|
||||
The program loads to a login screen or it auto logins.
|
||||
N U M B E R L A N D text appears at top.
|
||||
Colorful program appears.
|
||||
The program will show a picture and 5 buttons, "Time Attack", "Quiz", "Practice Mode", "Calculator", and "Exit".
|
||||
|
||||
Time Attack
|
||||
Once "Time Attack" is clicked a button is prompted to say "Ready to play?" and once clicked the game will start.
|
||||
The game generates random algorithmic math to be displayed in stdout.
|
||||
A countdown timer will also begin.
|
||||
The user will fill out answers at their pace.
|
||||
Once answered, it will immediately give response whether correct or incorrect.
|
||||
Timer:
|
||||
If timer goes out, stdin will stop and it will be left with "Game Over" text.
|
||||
A "+" button will appear to let the user increase time if desired to encourage critical thinking.
|
||||
The game keeps going until timer goes out or if stopped.
|
||||
|
||||
|
||||
Practice Mode
|
||||
This will prompt the user with "Ready to play?" and once clicked the game will start.
|
||||
This is almost verbatim quiz but will NOT UPDATE POINTS OR HISTORY.
|
||||
|
||||
Quiz
|
||||
Before playing there is an extra button to display previous ranked games called "History"
|
||||
Almost a carbon copy of "Practice Mode" except that there is a max time that cannot change.
|
||||
There also is no immediate feedback.
|
||||
Once over, the game will give a report of what was correct and incorrect.
|
||||
Quiz WILL UPDATE POINTS ALGORITHM AND UPDATE HISTORY.
|
||||
|
||||
History
|
||||
Will give a PDF of all your previous games and date.
|
||||
|
||||
Points
|
||||
Not a button.
|
||||
Text will appear at the top that gives the total rank in an algorithmic way.
|
||||
No more than 10 score. No smaller than 0.
|
||||
|
||||
Calculator
|
||||
Will create a calculator prompt at time but will auto-close during quiz.
|
||||
Buttons 0-9 and mathmatical symbols.
|
||||
|
||||
Exit
|
||||
Returns 0 and ends program
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
|
||||
This is all I can think of at the moment. Login will use mySQL and is still being considered.
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
get userID();
|
||||
get userAge();
|
||||
displayUserInfo();
|
||||
getUserInputGameMode();
|
||||
1.timeMode()
|
||||
2.quizMode()
|
||||
3.practiceMode()
|
||||
4.calculatorMode()
|
||||
5.highScore()
|
||||
Case1:
|
||||
displayTimeMode();
|
||||
userInputTimer();
|
||||
set time=userInputTimer();
|
||||
if (time >0)
|
||||
{
|
||||
A = randomA();
|
||||
B = randomB();
|
||||
answerC = A+B;
|
||||
displayA();
|
||||
displayB();
|
||||
D= randomD();
|
||||
if D=== C then randomD();
|
||||
else displayD();
|
||||
If user click on answerC then add ++ correctCounter;
|
||||
else set A=randomA(); set B=randomA();
|
||||
}
|
||||
</font></font></font><font color="#000000"> else save correctCounter to log;
|
||||
print “ Retry?” or “ exit”
|
||||
if user click retry, get userInputTimer();
|
||||
if user click exit, return to main menu;
|
||||
case2:
|
||||
question=setNumberOfQuestion();
|
||||
setArrayASize = question;
|
||||
setArrayBSize= question;
|
||||
setArrayCsize= question;
|
||||
for( i =0; i< question;i++)
|
||||
{
|
||||
arrayA[i]= random();
|
||||
arrayB[i] = random();
|
||||
arrayC[i]=arrayA[i]+arrayB[i]
|
||||
|
||||
}
|
||||
for(i=0;i<question;i++)
|
||||
{
|
||||
print arrayA[i] “ + “ print arrayB[i] “ = “
|
||||
arrayD[i]= userInput();
|
||||
if (arrayC[i]= arrayD[i] )
|
||||
correct++;
|
||||
else
|
||||
wrong++;
|
||||
}
|
||||
|
||||
display correct and wrong to screen;
|
||||
for(i=0;i<question;i++)
|
||||
{
|
||||
display arrayA[i]“+” ArrayB[i] “= “ arrayC[i] “your Answer” arrayD[i];
|
||||
|
||||
}
|
||||
ask user to continue quiz or exit to main screen
|
||||
case3:
|
||||
|
||||
if (continue = yes)
|
||||
{
|
||||
A= randomNumber();
|
||||
B= randomNumber();
|
||||
C= A+B;
|
||||
display A “+ “ B “=“ then get userInput();
|
||||
compare to C to userInput();
|
||||
get userInputContinue();
|
||||
}
|
||||
else
|
||||
exit to main menu
|
||||
|
||||
case4:
|
||||
display calculator
|
||||
|
||||
case5:
|
||||
DisplayScore();
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2513
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\expandedcolortbl;;}
|
||||
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
|
||||
\f0\fs24 \cf0 starting screen:\
|
||||
get userID();\
|
||||
get userAge();\
|
||||
displayUserInfo();\
|
||||
getUserInputGameMode();\
|
||||
1.timeMode()\
|
||||
2.quizMode()\
|
||||
3.practiceMode()\
|
||||
4.calculatorMode()\
|
||||
5.highScore()\
|
||||
Case1:\
|
||||
displayTimeMode();\
|
||||
userInputTimer();\
|
||||
set time=userInputTimer();\
|
||||
if (time >0)\
|
||||
\{\
|
||||
A = randomA();\
|
||||
B = randomB();\
|
||||
answerC = A+B;\
|
||||
displayA();\
|
||||
displayB();\
|
||||
D= randomD();\
|
||||
if D=== C then randomD();\
|
||||
else displayD();\
|
||||
If user click on answerC then add ++ correctCounter;\
|
||||
else set A=randomA(); set B=randomA(); \
|
||||
\}\
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
\cf0 else save correctCounter to log;\
|
||||
print \'93 Retry?\'94 or \'93 exit\'94\
|
||||
if user click retry, get userInputTimer();\
|
||||
if user click exit, return to main menu;\
|
||||
case2:\
|
||||
question=setNumberOfQuestion();\
|
||||
setArrayASize = question;\
|
||||
setArrayBSize= question;\
|
||||
setArrayCsize= question;\
|
||||
for( i =0; i< question;i++)\
|
||||
\{\
|
||||
arrayA[i]= random();\
|
||||
arrayB[i] = random();\
|
||||
arrayC[i]=arrayA[i]+arrayB[i]\
|
||||
\
|
||||
\}\
|
||||
for(i=0;i<question;i++)\
|
||||
\{\
|
||||
print arrayA[i] \'93 + \'93 print arrayB[i] \'93 = \'93\
|
||||
arrayD[i]= userInput(); \
|
||||
if (arrayC[i]= arrayD[i] )\
|
||||
correct++;\
|
||||
else\
|
||||
wrong++; \
|
||||
\}\
|
||||
\
|
||||
display correct and wrong to screen;\
|
||||
for(i=0;i<question;i++)\
|
||||
\{\
|
||||
display arrayA[i]\'93+\'94 ArrayB[i] \'93= \'93 arrayC[i] \'93your Answer\'94 arrayD[i];\
|
||||
\
|
||||
\}\
|
||||
ask user to continue quiz or exit to main screen\
|
||||
case3:\
|
||||
\
|
||||
if (continue = yes)\
|
||||
\{ \
|
||||
A= randomNumber();\
|
||||
B= randomNumber();\
|
||||
C= A+B;\
|
||||
display A \'93+ \'93 B \'93=\'93 then get userInput();\
|
||||
compare to C to userInput();\
|
||||
get userInputContinue();\
|
||||
\} \
|
||||
else \
|
||||
exit to main menu\
|
||||
\
|
||||
case4:\
|
||||
display calculator\
|
||||
\
|
||||
case5:\
|
||||
DisplayScore();\
|
||||
\
|
||||
\
|
||||
\
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,223 @@
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
\usepackage[a4paper, total={6in, 10in}]{geometry}
|
||||
\usepackage{verbatim}
|
||||
|
||||
% --> Here we go, satellite radio, y'all get hit with a...
|
||||
|
||||
\title{Group \#9 | Pseudocode}
|
||||
\author{Chris Nutter\and Michael Nguyen\and Loc Nguyen}
|
||||
\date
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\section{main()}
|
||||
\begin{verbatim}
|
||||
***************************************************
|
||||
|
||||
-> user opened exec
|
||||
|
||||
display:
|
||||
buttons for gamemodes
|
||||
_time, _rank, _practice, _calc
|
||||
text for points
|
||||
title text
|
||||
text for button labels
|
||||
hover over options for instructions (??)
|
||||
|
||||
---
|
||||
|
||||
while (user not exit) {
|
||||
CaseA = time_mode()
|
||||
CaseB = rank_mode()
|
||||
CaseC = practice_mode()
|
||||
CaseD = calculator()
|
||||
|
||||
if (user picks "time_mode()")
|
||||
display time_mode()
|
||||
|
||||
if (user picks "rank_mode")
|
||||
display rank_mode()
|
||||
|
||||
if (user picks "practice_mode")
|
||||
display practice_mode()
|
||||
|
||||
if (user picks "calculator"
|
||||
display calculator()
|
||||
}
|
||||
|
||||
close program
|
||||
|
||||
***************************************************
|
||||
\end{verbatim}
|
||||
|
||||
\newpage
|
||||
|
||||
\section{time\_mode() + \_start$\rightarrow$time\_mode()}
|
||||
\begin{verbatim}
|
||||
***************************************************
|
||||
|
||||
-> user clicked _time button
|
||||
|
||||
display:
|
||||
buttons for _start and _back
|
||||
text for instructions & "ready to start"
|
||||
|
||||
while (user not _back) {
|
||||
if (user picks "_start")
|
||||
display:
|
||||
_start->time_mode() // starting screen for time_mode()
|
||||
}
|
||||
|
||||
-> user clicked _start->time_mode()
|
||||
|
||||
display:
|
||||
one question
|
||||
input answer
|
||||
button for submit
|
||||
|
||||
variation 1:
|
||||
print question
|
||||
while (time is not 0) {
|
||||
while (user inputs answer) {
|
||||
if (answer correct)
|
||||
if (user has answered all questions)
|
||||
print congrats!
|
||||
return to main()
|
||||
else
|
||||
print nice! next problem...
|
||||
repeat--;
|
||||
else
|
||||
print try again... clock is ticking
|
||||
}
|
||||
}
|
||||
|
||||
variation 2:
|
||||
print ALL questions
|
||||
if (user does not input all answers)
|
||||
print "you didn't answer all questions"
|
||||
if (user is done)
|
||||
check answers
|
||||
if (incorrect answers)
|
||||
print incorrect answers
|
||||
else
|
||||
print congrats you got all them correct!
|
||||
return to main()
|
||||
|
||||
***************************************************
|
||||
\end{verbatim}
|
||||
|
||||
\section{quiz\_mode() + \_start\_quiz\_mode()}
|
||||
\begin{verbatim}
|
||||
***************************************************
|
||||
|
||||
--> user clicked quiz_mode()
|
||||
|
||||
display:
|
||||
buttons for _start and _back AND _print_sheet
|
||||
text for instructions & "ready to start" & print pdf sheet
|
||||
|
||||
if (user print pdf sheet)
|
||||
if (user hasn't taken test)
|
||||
print u have not taken test
|
||||
else
|
||||
pdf testsheet.pdf
|
||||
|
||||
while (user not _back) {
|
||||
if (user picks _start)
|
||||
display:
|
||||
_start->quiz_mode()
|
||||
}
|
||||
|
||||
--> user clicked _start->quiz_mode()
|
||||
|
||||
display:
|
||||
all questions in a grid form
|
||||
text with the problems
|
||||
input for the answers
|
||||
|
||||
if (user does not input all answers)
|
||||
print "you didn't answer all questions"
|
||||
if (user is done)
|
||||
check for answers
|
||||
if (incorrect answers)
|
||||
print incorrect answers
|
||||
else
|
||||
print congrats!
|
||||
save answers to log
|
||||
update rank points
|
||||
return to main()
|
||||
|
||||
***************************************************
|
||||
\end{verbatim}
|
||||
|
||||
\newpage
|
||||
|
||||
\section{practice\_mode() + \_start\_practice\_mode()}
|
||||
\begin{verbatim}
|
||||
***************************************************
|
||||
|
||||
--> user clicked practice_mode()
|
||||
|
||||
display:
|
||||
buttons for _start and _back
|
||||
text for instructions & "ready to start"
|
||||
|
||||
while (user not _back) {
|
||||
if (user picks _start)
|
||||
display:
|
||||
_start->practice_mode()
|
||||
}
|
||||
|
||||
--> user clicked _start->practice_mode()
|
||||
|
||||
display:
|
||||
all questions in a grid form
|
||||
text with the problems
|
||||
input for the answers
|
||||
|
||||
if (user does not input all answers)
|
||||
print "you didn't answer all questions"
|
||||
if (user is done)
|
||||
check for answers
|
||||
if (incorrect answers)
|
||||
print incorrect answers
|
||||
else
|
||||
print congrats!
|
||||
return to main()
|
||||
|
||||
***************************************************
|
||||
\end{verbatim}
|
||||
|
||||
\newpage
|
||||
|
||||
\section{calculator()}
|
||||
\begin{verbatim}
|
||||
***************************************************
|
||||
|
||||
--> user clicked calculator()
|
||||
|
||||
display:
|
||||
new window w/ either...
|
||||
windows: built in calculator
|
||||
mac: built in calculator
|
||||
linux: made from scratch calculator (so we actually code something)
|
||||
|
||||
while (user did not close calc) {
|
||||
do anything user wants with buttons on calculator
|
||||
}
|
||||
|
||||
close calculator
|
||||
|
||||
***************************************************
|
||||
\end{verbatim}
|
||||
|
||||
\newpage
|
||||
|
||||
|
||||
|
||||
|
||||
\end{document}
|
||||
|
||||
Reference in new issue
Block a user