C# Класс BalloonsPop.LogicProvider.LogicProvider

Implements IGameLogicProvider and defines operation on IGameModel type and it's properties and provides instances access to them.
Наследование: IGameLogicProvider
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

GameIsOver() публичный Метод

Determines whether a game is over.
public GameIsOver ( IBalloon matrix ) : bool
matrix IBalloon Array representation of the game field.
Результат bool

LetBalloonsFall() публичный Метод

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.
Результат void

LogicProvider() публичный Метод

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.
Результат System

PopBalloons() публичный Метод

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.
Результат void

RandomizeBalloonField() публичный Метод

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.
Результат void