-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
How this works:
|
@@ -43,18 +44,39 @@ | |||
private boolean guessesAvailable = false; | |||
private boolean gameFinished = false; | |||
private boolean stopGame = false; | |||
private boolean network = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give this a better name
startAW(); | ||
} | ||
|
||
private void startAW(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definitely needs changing. Name needs to be changed, way the logic works needs to be changed.
private void startAW(){ | ||
startAW(false); | ||
} | ||
private void startAW(boolean force){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename Force
@@ -83,6 +105,11 @@ public Output react(Interpretation input) { | |||
String intent = getIntent (input); | |||
Linguistics.UtteranceSentiment inputSentiment = getInference().inferSentiment(input); | |||
|
|||
if(!network){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alter this, there's probably a cleaner way to do this
|
||
startAW(); | ||
if(!network){ | ||
return Output.say("A network connection is required to play this game, should I try and look for a connection again?"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this string
@@ -253,7 +280,7 @@ private Output processUserGuessAnswer(String intent){ | |||
|
|||
private void resetGame(){ | |||
|
|||
aw = new AkiwrapperBuilder().setFilterProfanity(true).build(); | |||
startAW(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really what you want to do, is it even required that we reset AW. Can you get to this state without AW being set
Will completely refactor everything regarding to GameStates soon, which would make this obselete. |
Here is the code that I used to temp fix this. @ninalovegood please read over this code and correct it to your standards, since many of the solutions here are very "hacky" and probably not suitable for the
devel
branch.