C# Class MBC.Core.Game.UserMatch

A one-round match that uses the standard rules of battleship with a User verus a Bot.
Inheritance: MatchCore
Afficher le fichier Open project: aiclub/Mohawk_Battleship Class Usage Examples

Méthodes publiques

Méthode Description
AddUser ( Player user ) : void

To set the User as a player of the match.

ComputerTurn ( ) : void

Computer begins their turn.

Play ( ) : void

Starts a one round match.

Restart ( ) : void

To restart the match.

UserMatch ( Configuration conf ) : System

Constructs a match with a specific configuration.

UserShoot ( Shot shot ) : void

Starts the Users turn, shots and ends the turn.

Méthodes protégées

Méthode Description
PlayLogic ( ) : bool

Private Methods

Méthode Description
HandleAddPlayer ( Event ev ) : void
HandleEndTurn ( Event ev ) : void
HandleRoundBegin ( Event ev ) : void
HandleShipDestroyed ( Event ev ) : void
HandleShipMove ( Event ev ) : void
HandleShot ( Event ev ) : void
HandleWinner ( Event ev ) : void

Method Details

AddUser() public méthode

To set the User as a player of the match.
public AddUser ( Player user ) : void
user MBC.Shared.Entities.Player User controller
Résultat void

ComputerTurn() public méthode

Computer begins their turn.
public ComputerTurn ( ) : void
Résultat void

Play() public méthode

Starts a one round match.
public Play ( ) : void
Résultat void

PlayLogic() protected méthode

protected PlayLogic ( ) : bool
Résultat bool

Restart() public méthode

To restart the match.
public Restart ( ) : void
Résultat void

UserMatch() public méthode

Constructs a match with a specific configuration.
public UserMatch ( Configuration conf ) : System
conf Configuration Configuration Information
Résultat System

UserShoot() public méthode

Starts the Users turn, shots and ends the turn.
public UserShoot ( Shot shot ) : void
shot Shot
Résultat void