C# Class GameUILibrary.TetrisController

Implements Tetris based on code from https://code.google.com/p/wpf-tetris/
Inheritance: BindableBase
Show file Open project: EmptyKeys/UI_Examples

Private Properties

Property Type Description
ClearBlocks void
CreateBlock EmptyKeys.UserInterface.Generated.TetrisBlock
CreateNextTetris void
DetectGameOver bool
DrawNextTetris void
HideCurrentTetris void
HitTest bool
Initialize void
OnGameOver void
OnStart void
ReDrawTetris void
RenderCurrentTetris void
RenderCurrentTetris void
TetrisController System
TryClearLines void

Public Methods

Method Description
MoveDown ( ) : void

Moves down.

MoveLeft ( ) : void

Moves left.

MoveRight ( ) : void

Moves right.

Reset ( ) : void

Resets this instance.

Rotate ( ) : void

Rotates

Start ( ) : void

Starts this instance.

Stop ( ) : void

Stops this instance.

TetrisController ( Panel tetrisPanel, Panel nextTetrisPanel ) : System

Initializes a new instance of the TetrisController class.

Update ( double elapsedTime ) : void

Update logic

Private Methods

Method Description
ClearBlocks ( TetrisBlock blocks, int m, int n ) : void
CreateBlock ( ) : TetrisBlock
CreateNextTetris ( ) : void
DetectGameOver ( ) : bool
DrawNextTetris ( ) : void
HideCurrentTetris ( ) : void
HitTest ( ushort matrix, int offsetX, int offsetY ) : bool
Initialize ( Panel tetrisPanel, Panel nextTetrisPanel ) : void
OnGameOver ( ) : void
OnStart ( object obj ) : void
ReDrawTetris ( TetrisBlock blocks, ushort matrix, int m, int n, int offsetX, int offsetY, Brush fill ) : void
RenderCurrentTetris ( int offsetX, int offsetY ) : void
RenderCurrentTetris ( int offsetX, int offsetY, Brush fill ) : void
TetrisController ( ) : System
TryClearLines ( ) : void

Method Details

MoveDown() public method

Moves down.
public MoveDown ( ) : void
return void

MoveLeft() public method

Moves left.
public MoveLeft ( ) : void
return void

MoveRight() public method

Moves right.
public MoveRight ( ) : void
return void

Reset() public method

Resets this instance.
public Reset ( ) : void
return void

Rotate() public method

Rotates
public Rotate ( ) : void
return void

Start() public method

Starts this instance.
public Start ( ) : void
return void

Stop() public method

Stops this instance.
public Stop ( ) : void
return void

TetrisController() public method

Initializes a new instance of the TetrisController class.
public TetrisController ( Panel tetrisPanel, Panel nextTetrisPanel ) : System
tetrisPanel Panel The tetris panel.
nextTetrisPanel Panel The next tetris panel.
return System

Update() public method

Update logic
public Update ( double elapsedTime ) : void
elapsedTime double The elapsed time.
return void