Uses of Class
com.neven.ticTacToeGame.model.Game
-
Packages that use Game Package Description com.neven.ticTacToeGame.model com.neven.ticTacToeGame.model is a group of classes which is the key objects of the applicationcom.neven.ticTacToeGame.service com.neven.ticTacToeGame.service is a group of classes which uses repositories to provide some business functionalities.com.neven.ticTacToeGame.utils com.neven.ticTacToeGame.utils is a group of classes and enums which is helpful in the application but has no any business logic -
-
Uses of Game in com.neven.ticTacToeGame.model
Subclasses of Game in com.neven.ticTacToeGame.model Modifier and Type Class Description class
PlayerVsAlgorithmGame
ClassPlayerVsAlgorithmGame
extendGame
class and implement his two abstract methods for game with an Algorithm MiniMax(MiniMaxAlgorithm
).class
PlayerVsPlayerGame
ClassPlayerVsPlayerGame
extendGame
class and implement his two abstract methods for games Player versus Player.class
PlayerVsRandomGame
ClassPlayerVsPlayerGame
extendGame
class and implement his two abstract methods for games Player versus Random(random generated moves).Fields in com.neven.ticTacToeGame.model declared as Game Modifier and Type Field Description private Game
MiniMaxAlgorithm. game
Field with an injected in constructorGame
class.Methods in com.neven.ticTacToeGame.model that return Game Modifier and Type Method Description abstract Game
Game. makeFirstMove()
The abstract method should consist the logic how exactly the extendedGame
should make first move.Game
PlayerVsAlgorithmGame. makeFirstMove()
This method overrides parentmakeFirstMove()
method.Game
PlayerVsPlayerGame. makeFirstMove()
This method overrides parentmakeFirstMove()
method.Game
PlayerVsRandomGame. makeFirstMove()
This method overrides parentmakeFirstMove()
method.Game
Game. winningCheckAndMakingMove(int cellNumber)
This method is the main logical method of the game.Constructors in com.neven.ticTacToeGame.model with parameters of type Game Constructor Description MiniMaxAlgorithm(Game game)
Constructor for classMiniMaxAlgorithm
.
Constructor initializedMiniMaxAlgorithm.game
field by incoming paramPlayerVsAlgorithmGame
value. -
Uses of Game in com.neven.ticTacToeGame.service
Methods in com.neven.ticTacToeGame.service with parameters of type Game Modifier and Type Method Description void
StatisticService. updateStatistic(Game game)
This method receiveGame
with game result and update the statistic with a nameStatistic.STATISTIC_NAME
and save the result in database. -
Uses of Game in com.neven.ticTacToeGame.utils
Methods in com.neven.ticTacToeGame.utils that return Game Modifier and Type Method Description static Game
GamesFactory. getGame(GameTypes gameType)
This method return specificGame
(can bePlayerVsPlayerGame
,PlayerVsRandomGame
,PlayerVsAlgorithmGame
) by receiving game type fromGameTypes
.
-