C# Class WebGame.GameServer

Datei anzeigen Open project: AdmiralPotato/ggj2013

Public Properties

Property Type Description
OnlineAccounts List

Public Methods

Method Description
CreateDB ( ) : DBConnection
EmailAllPlayers ( Game game, string subject, string message, bool isGameStart = false ) : void
GetActiveGames ( ) : List
GetGame ( int id ) : Game
GetNewGames ( ) : List
GetOnlineAccount ( int accountId ) : Account
GetPlayerGames ( int accountId, bool allGames = false, bool invites = false ) : List
KillGame ( int gameId ) : void
PlayerInvited ( Game game, Account account ) : void
PlayerJoined ( Game game, int accountId ) : void
PlayerUnjoined ( Game game, int accountId ) : void
SaveGame ( Game game ) : void
SaveNewGame ( Game game ) : void
SendEmail ( string toAccountEmail, string toAccountName, string subject, string message ) : void
SendMessage ( DBConnection db, int destinationId, int sourceId, string sourceName, string text ) : string

Private Methods

Method Description
CanSend ( DBConnection db, int sourceId ) : bool
GameServer ( ) : System
GetLastLogin ( DBConnection db, int accountId ) : System.DateTime

Method Details

CreateDB() public static method

public static CreateDB ( ) : DBConnection
return DBConnection

EmailAllPlayers() public static method

public static EmailAllPlayers ( Game game, string subject, string message, bool isGameStart = false ) : void
game Game
subject string
message string
isGameStart bool
return void

GetActiveGames() public static method

public static GetActiveGames ( ) : List
return List

GetGame() public static method

public static GetGame ( int id ) : Game
id int
return Game

GetNewGames() public static method

public static GetNewGames ( ) : List
return List

GetOnlineAccount() public static method

public static GetOnlineAccount ( int accountId ) : Account
accountId int
return Account

GetPlayerGames() public static method

public static GetPlayerGames ( int accountId, bool allGames = false, bool invites = false ) : List
accountId int
allGames bool
invites bool
return List

KillGame() public static method

public static KillGame ( int gameId ) : void
gameId int
return void

PlayerInvited() public static method

public static PlayerInvited ( Game game, Account account ) : void
game Game
account Account
return void

PlayerJoined() public static method

public static PlayerJoined ( Game game, int accountId ) : void
game Game
accountId int
return void

PlayerUnjoined() public static method

public static PlayerUnjoined ( Game game, int accountId ) : void
game Game
accountId int
return void

SaveGame() public static method

public static SaveGame ( Game game ) : void
game Game
return void

SaveNewGame() public static method

public static SaveNewGame ( Game game ) : void
game Game
return void

SendEmail() public static method

public static SendEmail ( string toAccountEmail, string toAccountName, string subject, string message ) : void
toAccountEmail string
toAccountName string
subject string
message string
return void

SendMessage() public static method

public static SendMessage ( DBConnection db, int destinationId, int sourceId, string sourceName, string text ) : string
db DBConnection
destinationId int
sourceId int
sourceName string
text string
return string

Property Details

OnlineAccounts public_oe static_oe property

public static List OnlineAccounts
return List