Package sac.model.gamemodes
Class DefaultCore
java.lang.Object
sac.model.gamemodes.DefaultCore
- All Implemented Interfaces:
GameCore
The default game core used by classic Tetris game mode.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
getSpawnPosition
(Piece piece) Spawn the piece in the middle of the board.int
getWidth()
-
Constructor Details
-
DefaultCore
public DefaultCore()
-
-
Method Details
-
getPieceGenerator
- Specified by:
getPieceGenerator
in interfaceGameCore
- Returns:
- the pieceGenerator this game would use
-
getRotationSystem
- Specified by:
getRotationSystem
in interfaceGameCore
- Returns:
- the rotationSystem this game would use
-
getSpawnPosition
Spawn the piece in the middle of the board.- Specified by:
getSpawnPosition
in interfaceGameCore
- Parameters:
piece
- - current piece spawned- Returns:
- the spawn position
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getBuffer
public int getBuffer()
-