|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GameMode
Created by IntelliJ IDEA. User: olekrst Date: 22.feb.2007 Time: 13:19:13 Interface used to dynamically swap the gameMode. All GameModes must implement this interface.
Method Summary | |
---|---|
int |
checkAns(java.lang.String answer,
StudentClient c)
Checks the answer from the studentclients and returns an int depending on what is expected from the gamemode. |
java.lang.String |
createClientQuestion()
Uses the current question in the round and formats it for sending to the student clients |
java.lang.String |
createMasterQuestion()
Formats a question for sending to the master client. |
int |
getMaxScore()
Returns the maximum possible score per question |
int |
getQuestionState()
Returns an integer referencing the question state in the LG constants class |
java.lang.String |
handleClientQuestionReply(int score,
int roundScore,
int totalPossibleScore)
Formats the results of the question answers from the studentclients |
java.lang.String |
handleEndOfRound()
Formats an end of round string for sending to the masterclient |
java.lang.String |
handleQuestionReply()
Method for creating the reply string which is sendt to the masterclient. |
void |
initiateRound()
Extracts all the questions from the current round from the database |
Question |
nextQuestion()
Iterates to the the next question in the round. |
void |
setQuestionState(int s)
Sets the state of the current question to the state given as an argument. |
Method Detail |
---|
java.lang.String handleQuestionReply()
java.lang.String handleEndOfRound()
Question nextQuestion()
Question
java.lang.String createMasterQuestion()
int getQuestionState()
LG
void setQuestionState(int s)
s
- question state (see LG constants class)LG
java.lang.String createClientQuestion()
StudentClient
,
Question
void initiateRound()
DataBaseConnection
java.lang.String handleClientQuestionReply(int score, int roundScore, int totalPossibleScore)
score
- the score received from answering the last questionroundScore
- total score in the current roundtotalPossibleScore
- overall score
int getMaxScore()
Question
int checkAns(java.lang.String answer, StudentClient c)
answer
- the answer index represented by a stringc
- the client which replied
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |