C# 클래스 BalloonsPop.LogicProvider.LogicProvider

Implements IGameLogicProvider and defines operation on IGameModel type and it's properties and provides instances access to them.
상속: IGameLogicProvider
파일 보기 프로젝트 열기: Baloons-Pop-4/Main

공개 메소드들

메소드 설명
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