C# Class Tetris.Board

The game board
Mostrar archivo Open project: vs-team/casanova-mk2 Class Usage Examples

Public Methods

Method Description
Board ( Tetris.Game game, Texture2D &textures, Rectangle rectangles ) : System
CreateNewFigure ( ) : bool

Create new shape in the game, if need it

DestroyLines ( ) : int

Find, destroy and save lines's count

Draw ( GameTime gameTime ) : void
FindDynamicFigure ( ) : void
Initialize ( ) : void
MoveFigureDown ( ) : void
MoveFigureLeft ( ) : void
MoveFigureRight ( ) : void
RotateFigure ( ) : void
SortingVector2 ( System.Vector2 &vector, bool sortByX, int a, int b ) : void

Private Methods

Method Description
ClearBoardField ( int i, int j ) : void
DrawFigureOnBoard ( System.Vector2 vector, int color ) : bool
TryPlaceFigureOnBoard ( System.Vector2 vector ) : bool

Method Details

Board() public method

public Board ( Tetris.Game game, Texture2D &textures, Rectangle rectangles ) : System
game Tetris.Game
textures Texture2D
rectangles System.Drawing.Rectangle
return System

CreateNewFigure() public method

Create new shape in the game, if need it
public CreateNewFigure ( ) : bool
return bool

DestroyLines() public method

Find, destroy and save lines's count
public DestroyLines ( ) : int
return int

Draw() public method

public Draw ( GameTime gameTime ) : void
gameTime GameTime
return void

FindDynamicFigure() public method

public FindDynamicFigure ( ) : void
return void

Initialize() public method

public Initialize ( ) : void
return void

MoveFigureDown() public method

public MoveFigureDown ( ) : void
return void

MoveFigureLeft() public method

public MoveFigureLeft ( ) : void
return void

MoveFigureRight() public method

public MoveFigureRight ( ) : void
return void

RotateFigure() public method

public RotateFigure ( ) : void
return void

SortingVector2() public method

public SortingVector2 ( System.Vector2 &vector, bool sortByX, int a, int b ) : void
vector System.Vector2
sortByX bool
a int
b int
return void