C# Class PushFrenzy.Rules.Board

Show file Open project: paulbatum/PushFrenzy Class Usage Examples

Public Methods

Method Description
AddNewPieceAtRandomEmptySlot ( Player owner ) : Slot
AddNewPieceToSlot ( Slot slot, Player owner ) : void
Board ( int width, int height ) : System
Column ( int x ) : IEnumerable
GetRandomEmptySlot ( ) : Slot
GetSlotForDirection ( Slot origin, Direction direction ) : Slot
MovePieceToSlot ( Slot origin, Slot destination, IMessageLog log ) : void
RemovePlayerAndPieces ( Player player ) : void
Row ( int y ) : IEnumerable
SlotAt ( int x, int y ) : Slot

Method Details

AddNewPieceAtRandomEmptySlot() public method

public AddNewPieceAtRandomEmptySlot ( Player owner ) : Slot
owner Player
return Slot

AddNewPieceToSlot() public method

public AddNewPieceToSlot ( Slot slot, Player owner ) : void
slot Slot
owner Player
return void

Board() public method

public Board ( int width, int height ) : System
width int
height int
return System

Column() public method

public Column ( int x ) : IEnumerable
x int
return IEnumerable

GetRandomEmptySlot() public method

public GetRandomEmptySlot ( ) : Slot
return Slot

GetSlotForDirection() public method

public GetSlotForDirection ( Slot origin, Direction direction ) : Slot
origin Slot
direction Direction
return Slot

MovePieceToSlot() public method

public MovePieceToSlot ( Slot origin, Slot destination, IMessageLog log ) : void
origin Slot
destination Slot
log IMessageLog
return void

RemovePlayerAndPieces() public method

public RemovePlayerAndPieces ( Player player ) : void
player Player
return void

Row() public method

public Row ( int y ) : IEnumerable
y int
return IEnumerable

SlotAt() public method

public SlotAt ( int x, int y ) : Slot
x int
y int
return Slot