C# Class MBC.Shared.Entities.Match

Provides the modifications, events, and properties that are necessary to operate a game of battleship. All events must be subscribed to.
Inheritance: System.Entity
ファイルを表示 Open project: aiclub/Mohawk_Battleship Class Usage Examples

Public Methods

Method Description
Match ( System.Entity parent ) : System

Protected Methods

Method Description
Begin ( ) : void

Begins the match.

End ( ) : void

Ends the match.

PlayerAdd ( Player player ) : void

Creates a MatchAddPlayerEvent from within the match and returns it. Invokes any event subscriptions to OnPlayerAdd.

PlayerRemove ( Player player ) : void

Creates a MatchRemovePlayerEvent from within the match and returns it. Invokes any event subscriptions to OnPlayerRemove.

RoundBegin ( ) : void

Creates a RoundBeginEvent from within the match and returns it. Invokes any event subscriptions to OnRoundBegin.

RoundEnd ( int roundNumber ) : void

Creates a RoundEndEvent from within the match and returns it. Invokes any event subscriptions to OnRoundEnd.

TeamAdd ( Team team ) : void

Creates a MatchTeamAddEvent from within the match and returns it. Invokes any event subscriptions to OnTeamAdd.

TeamRemove ( Team team ) : void

Creates a MatchTeamRemoveEvent from within the match and returns it. Invokes any event subscriptions to OnTeamRemove.

Method Details

Begin() protected method

Begins the match.
protected Begin ( ) : void
return void

End() protected method

Ends the match.
protected End ( ) : void
return void

Match() public method

public Match ( System.Entity parent ) : System
parent System.Entity
return System

PlayerAdd() protected method

Creates a MatchAddPlayerEvent from within the match and returns it. Invokes any event subscriptions to OnPlayerAdd.
Thrown when the event being created is not valid for the /// current state of the match.
protected PlayerAdd ( Player player ) : void
player Player
return void

PlayerRemove() protected method

Creates a MatchRemovePlayerEvent from within the match and returns it. Invokes any event subscriptions to OnPlayerRemove.
Thrown when the event being created is not valid for the /// current state of the match.
protected PlayerRemove ( Player player ) : void
player Player
return void

RoundBegin() protected method

Creates a RoundBeginEvent from within the match and returns it. Invokes any event subscriptions to OnRoundBegin.
Thrown when the event being created is not valid for the /// current state of the match.
protected RoundBegin ( ) : void
return void

RoundEnd() protected method

Creates a RoundEndEvent from within the match and returns it. Invokes any event subscriptions to OnRoundEnd.
Thrown when the event being created is not valid for the /// current state of the match.
protected RoundEnd ( int roundNumber ) : void
roundNumber int
return void

TeamAdd() protected method

Creates a MatchTeamAddEvent from within the match and returns it. Invokes any event subscriptions to OnTeamAdd.
Thrown when the event being created is not valid for the /// current state of the match.
protected TeamAdd ( Team team ) : void
team Team
return void

TeamRemove() protected method

Creates a MatchTeamRemoveEvent from within the match and returns it. Invokes any event subscriptions to OnTeamRemove.
Thrown when the event being created is not valid for the /// current state of the match.
protected TeamRemove ( Team team ) : void
team Team
return void