Interface GameView
-
- All Superinterfaces:
ChallengeResponseView
,MvpView
- All Known Subinterfaces:
HtmlGameView
,ScratcherView
- All Known Implementing Classes:
GameBaseFragment
,HtmlGameFragment
,ScratcherFragment
public interface GameView extends ChallengeResponseView
Base view class for game challenge response.This view must be implemented to notify the Activity or Fragment of the API call returns.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setGameError(java.lang.String error)
Notifies the view that the game failed to initializevoid
setGameResult(Prize prize)
Notifies the view when the challenge respond is successfulvoid
showGameLostMessage(com.google.gson.JsonObject secondaryPrize, java.lang.String message)
Notifies the view to inform the user that he lost the gamevoid
showGameWonMessage(Prize prize, com.google.gson.JsonObject secondaryPrize, java.lang.String message)
Notifies the view to inform the user that he won the game-
Methods inherited from interface com.cheetahdigital.challenges.ui.responses.base.ChallengeResponseView
onChallengeRespondSuccess, showErrorMessage, showLoading, showReward
-
-
-
-
Method Detail
-
setGameResult
void setGameResult(Prize prize)
Notifies the view when the challenge respond is successful- Parameters:
prize
-Prize
model
-
showGameWonMessage
void showGameWonMessage(Prize prize, com.google.gson.JsonObject secondaryPrize, java.lang.String message)
Notifies the view to inform the user that he won the game- Parameters:
prize
- reward for winning the gamesecondaryPrize
- additional prizemessage
- response message
-
showGameLostMessage
void showGameLostMessage(com.google.gson.JsonObject secondaryPrize, java.lang.String message)
Notifies the view to inform the user that he lost the game- Parameters:
secondaryPrize
- consolation prizemessage
- response message
-
setGameError
void setGameError(java.lang.String error)
Notifies the view that the game failed to initialize- Parameters:
error
- error message
-
-