C# Class BalloonsPop.LogicProvider.LogicProvider

Implements IGameLogicProvider and defines operation on IGameModel type and it's properties and provides instances access to them.
Inheritance: IGameLogicProvider
Afficher le fichier Open project: Baloons-Pop-4/Main

Méthodes publiques

Méthode Description
GameIsOver ( IBalloon matrix ) : bool

Determines whether a game is over.

LetBalloonsFall ( IBalloon field ) : void

Moves all non-popped balloons vertically to the bottom of the array, effectively simulating gravity.

LogicProvider ( IMatrixValidator matrixValidator, IRandomNumberGenerator rng ) : System

Initializes a new instance of the LogicProvider class with matrix validator and random number generator.

PopBalloons ( IBalloon field, int row, int column ) : void

Provides popping logic based on field, row and column.

RandomizeBalloonField ( IBalloon field ) : void

Provides randomization of a balloon field represented as two-dimensional array.

Method Details

GameIsOver() public méthode

Determines whether a game is over.
public GameIsOver ( IBalloon matrix ) : bool
matrix IBalloon Array representation of the game field.
Résultat bool

LetBalloonsFall() public méthode

Moves all non-popped balloons vertically to the bottom of the array, effectively simulating gravity.
public LetBalloonsFall ( IBalloon field ) : void
field IBalloon Array representation of the game field.
Résultat void

LogicProvider() public méthode

Initializes a new instance of the LogicProvider class with matrix validator and random number generator.
public LogicProvider ( IMatrixValidator matrixValidator, IRandomNumberGenerator rng ) : System
matrixValidator IMatrixValidator The matrix validator.
rng IRandomNumberGenerator The random byte generator.
Résultat System

PopBalloons() public méthode

Provides popping logic based on field, row and column.
public PopBalloons ( IBalloon field, int row, int column ) : void
field IBalloon Array representation of the game field.
row int The number of rows in the field.
column int The number of columns in the field.
Résultat void

RandomizeBalloonField() public méthode

Provides randomization of a balloon field represented as two-dimensional array.
public RandomizeBalloonField ( IBalloon field ) : void
field IBalloon The array representation of a game field.
Résultat void