Package com.neven.ticTacToeGame.utils
Class GamesFactory
- java.lang.Object
-
- com.neven.ticTacToeGame.utils.GamesFactory
-
public class GamesFactory extends java.lang.Object
ClassGamesFactory
is a Factory Design Pattern.- Author:
- Arterm Koliushko, https://www.linkedin.com/in/artem-koliushko/
- See Also:
- Factory Design Pattern
-
-
Constructor Summary
Constructors Constructor Description GamesFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Game
getGame(GameTypes gameType)
This method return specificGame
(can bePlayerVsPlayerGame
,PlayerVsRandomGame
,PlayerVsAlgorithmGame
) by receiving game type fromGameTypes
.
-
-
-
Method Detail
-
getGame
public static Game getGame(GameTypes gameType)
This method return specificGame
(can bePlayerVsPlayerGame
,PlayerVsRandomGame
,PlayerVsAlgorithmGame
) by receiving game type fromGameTypes
.- Parameters:
gameType
-Enum
GameTypes
class, which contain different types of theGame
.- Returns:
Game
with a specific game type, can bePlayerVsPlayerGame
,PlayerVsRandomGame
orPlayerVsAlgorithmGame
.
-
-