C# Класс MBC.Core.Game.UserMatch

A one-round match that uses the standard rules of battleship with a User verus a Bot.
Наследование: MatchCore
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
PlayLogic ( ) : bool

Приватные методы

Метод Описание
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

Описание методов

AddUser() публичный Метод

To set the User as a player of the match.
public AddUser ( Player user ) : void
user MBC.Shared.Entities.Player User controller
Результат void

ComputerTurn() публичный Метод

Computer begins their turn.
public ComputerTurn ( ) : void
Результат void

Play() публичный Метод

Starts a one round match.
public Play ( ) : void
Результат void

PlayLogic() защищенный Метод

protected PlayLogic ( ) : bool
Результат bool

Restart() публичный Метод

To restart the match.
public Restart ( ) : void
Результат void

UserMatch() публичный Метод

Constructs a match with a specific configuration.
public UserMatch ( Configuration conf ) : System
conf Configuration Configuration Information
Результат System

UserShoot() публичный Метод

Starts the Users turn, shots and ends the turn.
public UserShoot ( Shot shot ) : void
shot Shot
Результат void