C# Class BattleShip.Core.GameHost

Afficher le fichier Open project: pebblecode/HackShips Class Usage Examples

Méthodes publiques

Méthode Description
CreateGame ( string gameName, string initiatingPlayerName, string initiatingPlayerEmail, string acceptingPlayerName, string acceptingPlayerEmail ) : System.Guid
GetNextPlayerEmail ( System.Guid gameId ) : string
GetOpponentTargetZone ( System.Guid gameId, string requestPlayerEmail ) : TargetZone
SetPlayerLocation ( System.Guid gameId, string playerEmail, GeoCoordinate location ) : void
TakeShot ( System.Guid gameId, string playerTakingShotEmail, GeoCoordinate shotLocation ) : ShotResult

Private Methods

Méthode Description
FindGame ( System.Guid gameId ) : Game
FindGameAndPlayer ( System.Guid gameId, string playerEmail, Player &player ) : Game
FindOpponentByPlayerEmail ( Game game, string playerEmail ) : Player
FindPlayerByEmail ( Game game, string playerEmail ) : Player

Method Details

CreateGame() public méthode

public CreateGame ( string gameName, string initiatingPlayerName, string initiatingPlayerEmail, string acceptingPlayerName, string acceptingPlayerEmail ) : System.Guid
gameName string
initiatingPlayerName string
initiatingPlayerEmail string
acceptingPlayerName string
acceptingPlayerEmail string
Résultat System.Guid

GetNextPlayerEmail() public méthode

public GetNextPlayerEmail ( System.Guid gameId ) : string
gameId System.Guid
Résultat string

GetOpponentTargetZone() public méthode

public GetOpponentTargetZone ( System.Guid gameId, string requestPlayerEmail ) : TargetZone
gameId System.Guid
requestPlayerEmail string
Résultat TargetZone

SetPlayerLocation() public méthode

public SetPlayerLocation ( System.Guid gameId, string playerEmail, GeoCoordinate location ) : void
gameId System.Guid
playerEmail string
location GeoCoordinate
Résultat void

TakeShot() public méthode

public TakeShot ( System.Guid gameId, string playerTakingShotEmail, GeoCoordinate shotLocation ) : ShotResult
gameId System.Guid
playerTakingShotEmail string
shotLocation GeoCoordinate
Résultat ShotResult