C# Class WebGame.Game

Afficher le fichier Open project: AdmiralPotato/ggj2013 Class Usage Examples

Méthodes publiques

Свойство Type Description
DefaultShips Ship>.Dictionary
IsRunning bool
OnEnd Player>.Action
Random System.Random

Private Properties

Свойство Type Description
ConnectPlayer Player
DisconnectPlayer void
DisconnectPlayer void
GetDefaultShip Ship
timer_Elapsed void

Méthodes publiques

Méthode Description
Add ( StarSystem starSystem ) : void
DisplayGameStatus ( int accountId, bool isAdmin ) : string
EliminatePlayer ( Player loser ) : void
End ( ) : void
ForceEnd ( ) : void
Game ( ) : System
GenScore ( int place ) : double
GenScoreExpected ( int playerRating, int opponentRating ) : double
GetActivePlayerCount ( ) : int
GetPlayer ( int accountId ) : Player
GetPlayer ( string sessionId ) : Player
GetScoreExpected ( Player player ) : double
Join ( int accountId, string name, int rating ) : Player
Join ( Player player ) : void
Load ( byte data ) : Game
Run ( ) : void
Save ( ) : byte[]
SendForumMessage ( string text, Player source, string sourceName = "Computer" ) : void
Start ( ) : void
StopRunning ( ) : void
Unjoin ( Player player ) : void
Update ( System.TimeSpan elapsed ) : void

Private Methods

Méthode Description
ConnectPlayer ( string signalrConnectionId, string sessionId ) : Player
DisconnectPlayer ( Player player ) : void
DisconnectPlayer ( string signalrConnectionId, string sessionId ) : void
GetDefaultShip ( int defaultShipNumber, string name = "Heart of the Deep" ) : Ship
timer_Elapsed ( object sender, System e ) : void

Method Details

Add() public méthode

public Add ( StarSystem starSystem ) : void
starSystem StarSystem
Résultat void

DisplayGameStatus() public méthode

public DisplayGameStatus ( int accountId, bool isAdmin ) : string
accountId int
isAdmin bool
Résultat string

EliminatePlayer() public méthode

public EliminatePlayer ( Player loser ) : void
loser Player
Résultat void

End() public méthode

public End ( ) : void
Résultat void

ForceEnd() public méthode

public ForceEnd ( ) : void
Résultat void

Game() public méthode

public Game ( ) : System
Résultat System

GenScore() public méthode

public GenScore ( int place ) : double
place int
Résultat double

GenScoreExpected() public méthode

public GenScoreExpected ( int playerRating, int opponentRating ) : double
playerRating int
opponentRating int
Résultat double

GetActivePlayerCount() public méthode

public GetActivePlayerCount ( ) : int
Résultat int

GetPlayer() public méthode

public GetPlayer ( int accountId ) : Player
accountId int
Résultat Player

GetPlayer() public méthode

public GetPlayer ( string sessionId ) : Player
sessionId string
Résultat Player

GetScoreExpected() public méthode

public GetScoreExpected ( Player player ) : double
player Player
Résultat double

Join() public méthode

public Join ( int accountId, string name, int rating ) : Player
accountId int
name string
rating int
Résultat Player

Join() public méthode

public Join ( Player player ) : void
player Player
Résultat void

Load() public static méthode

public static Load ( byte data ) : Game
data byte
Résultat Game

Run() public méthode

public Run ( ) : void
Résultat void

Save() public méthode

public Save ( ) : byte[]
Résultat byte[]

SendForumMessage() public méthode

public SendForumMessage ( string text, Player source, string sourceName = "Computer" ) : void
text string
source Player
sourceName string
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

StopRunning() public méthode

public StopRunning ( ) : void
Résultat void

Unjoin() public méthode

public Unjoin ( Player player ) : void
player Player
Résultat void

Update() public méthode

public Update ( System.TimeSpan elapsed ) : void
elapsed System.TimeSpan
Résultat void

Property Details

DefaultShips public_oe property

public Dictionary DefaultShips
Résultat Ship>.Dictionary

IsRunning public_oe property

public bool IsRunning
Résultat bool

OnEnd public_oe static_oe property

public static Action OnEnd
Résultat Player>.Action

Random public_oe static_oe property

public static Random,System Random
Résultat System.Random