Method | Description | |
---|---|---|
AddPlayer ( Player plr ) : bool |
Adds a player to the match.
|
|
AddTeam ( Team newTeam ) : bool |
Adds a team to the match.
|
|
Match ( Configuration config ) : System |
Creates a match with parameters loaded from a configuration.
|
|
Play ( ) : void |
Moves the match progress forward at a standard pace.
|
|
PlayerDisqualified ( Player plr, string reason ) : bool |
Signals a disqualification event against a player for a specific reason.
|
|
PlayerLost ( Player plr ) : bool |
Marks a player as a loser in the current round and increases their losing score. Player must be active in order to lose, otherwise this method returns false.
|
|
PlayerSetShips ( Player plr, IList |
Sets the ships that are assigned to a player.
|
|
PlayerShot ( Player plr, Shot shot ) : bool |
Use when a player shoots.
|
|
PlayerShot ( Player plr, Shot shot, Ship shipHit ) : bool |
Use when a player shoots and hits a ship.
|
|
PlayerTeamAssign ( Player plr, Team newTeam ) : bool |
Assign a player to a team.
|
|
PlayerTimeout ( Player plr, |
Call when a player has timed out.
|
|
PlayerWin ( Player plr ) : void |
Call when a player has won a round.
|
|
RemovePlayer ( Player plr ) : bool |
Call when a player is to be removed from the match.
|
|
RemoveTeam ( Team remTeam ) : bool |
Call when a team is to be removed from the match.
|
|
ShipsValid ( Player player ) : bool |
Checks if a player's ship are placed, and are valid within the parameters of the match.
|
|
Stop ( ) : void |
Stops progression of the match.
|
Method | Description | |
---|---|---|
IsShotValid ( Shot shot ) : bool |
Determines whether or not a given shot is valid within the parameters of the match.
|
|
PlayLogic ( ) : bool | ||
PlayerMessage ( Player plr, string msg ) : void |
Call when a player is outputting a message.
|
|
PlayerShipDestroyed ( Player plr, Ship destroyedShip ) : void |
Call when a ship from a player has been destroyed.
|
|
SetParameters ( Configuration conf ) : void |
Changes the match parameters to reflect the configuration given.
|
Method | Description | |
---|---|---|
AppendEvent ( MBC.Core.Events.Event ev ) : void |
Appends an event to the list of events of the match, with a proper timestamp.
|
|
ApplyParameters ( Configuration conf ) : void |
Applies a configuration to the match.
|
|
EndRound ( ) : void |
Notifies the end of a round.
|
|
MatchEnd ( ) : bool |
Called when the match ends.
|
|
NewRound ( ) : void |
Notifies a new round beginning.
|
|
NotifyParamsChanged ( ) : void |
Notifies match parameter changes.
|
public Match ( Configuration config ) : System | ||
config | Configuration | |
return | System |
public PlayerDisqualified ( Player plr, string reason ) : bool | ||
plr | Player | |
reason | string | |
return | bool |
protected PlayerMessage ( Player plr, string msg ) : void | ||
plr | Player | |
msg | string | |
return | void |
public PlayerSetShips ( Player plr, IList |
||
plr | Player | |
ships | IList |
|
return | bool |
protected PlayerShipDestroyed ( Player plr, Ship destroyedShip ) : void | ||
plr | Player | |
destroyedShip | Ship | |
return | void |
public PlayerShot ( Player plr, Shot shot ) : bool | ||
plr | Player | |
shot | Shot | |
return | bool |
public PlayerShot ( Player plr, Shot shot, Ship shipHit ) : bool | ||
plr | Player | |
shot | Shot | |
shipHit | Ship | |
return | bool |
public PlayerTeamAssign ( Player plr, Team newTeam ) : bool | ||
plr | Player | |
newTeam | Team | |
return | bool |
public PlayerTimeout ( Player plr, |
||
plr | Player | |
ex | ||
return | void |
protected SetParameters ( Configuration conf ) : void | ||
conf | Configuration | |
return | void |