C# Class ArmedCards.BusinessLogic.AppServices.Hubs.SendMessage

Implementation of ISendMessage
Inheritance: Base.ISendMessage
Exibir arquivo Open project: kwmcrell/ArmedCards

Public Methods

Method Description
CardPlayed ( Entities game, System.Boolean sendToSpectators ) : void

Update the game view when a card is played

CommanderLeft ( Entities game, String commanderName ) : void

Alert the users that the round has been lost because the commander has left

SendMessage ( ActiveConnection selectActiveConnection ) : System
SendWinnerSelected ( Entities game, Entities round, System.Boolean sendToSpectators ) : void

Update the game view when the commander has selected the winner of the round

UpdateGame ( Entities game, System.Boolean sendToSpectators ) : void

Update most of the game view

UpdateGame ( Entities game, System.Boolean sendToSpectators, Int32 forcedToLeaveUserId ) : void

Update most of the game view

UpdateLobby ( Entities game, System.Boolean sendToSpectators ) : void

Update the lobby

UpdateWaiting ( Entities game, System.Boolean sendToSpectators ) : void

Update the waiting screen for the game

VoteComplete ( Int32 gameID, Entities kickedUser, Int32 votesToKick, Int32 votesNotToKick, System.Boolean isKicked ) : void

Alert the users a vote to kick has completed

Voted ( Int32 gameID, Entities kickedUser, Int32 votesToKick, Int32 votesNotToKick, List alreadyVoted ) : void

Alert the users a vote to kick has been placed

Private Methods

Method Description
Execute ( Entities game, Entities action, System.Boolean sendToSpectators, Int32 excludedPlayerId = null ) : Entities.ActiveConnection
ExecuteAction ( Entities game, Entities action, IEnumerable connections, List users ) : void
GetConnections ( Int32 gameID, List exclude ) : List
GetGameBoardModal ( Entities connection, Entities game ) : Entities.Models.Game.Board.GameBoard

Get a gameboard model

GetGameLobbyViewModel ( Entities connection, Entities game ) : Entities.Models.Game.Board.Lobby
GetPlayerType ( Entities connection ) : Entities.Enums.GamePlayerType
SendWinnerSelected ( Entities game, Entities round, IEnumerable connections, List users ) : void

Method Details

CardPlayed() public method

Update the game view when a card is played
public CardPlayed ( Entities game, System.Boolean sendToSpectators ) : void
game Entities The game to update
sendToSpectators System.Boolean Should this update go to the spectators
return void

CommanderLeft() public method

Alert the users that the round has been lost because the commander has left
public CommanderLeft ( Entities game, String commanderName ) : void
game Entities The game
commanderName String The commander's name
return void

SendMessage() public method

public SendMessage ( ActiveConnection selectActiveConnection ) : System
selectActiveConnection ActiveConnection
return System

SendWinnerSelected() public method

Update the game view when the commander has selected the winner of the round
public SendWinnerSelected ( Entities game, Entities round, System.Boolean sendToSpectators ) : void
game Entities The game to update
round Entities The game's current round
sendToSpectators System.Boolean Should this update go to spectators
return void

UpdateGame() public method

Update most of the game view
public UpdateGame ( Entities game, System.Boolean sendToSpectators ) : void
game Entities The game to update
sendToSpectators System.Boolean Should this update go to the spectators
return void

UpdateGame() public method

Update most of the game view
public UpdateGame ( Entities game, System.Boolean sendToSpectators, Int32 forcedToLeaveUserId ) : void
game Entities The game to update
sendToSpectators System.Boolean Should this update go to the spectators
forcedToLeaveUserId System.Int32 The player was forced to leave
return void

UpdateLobby() public method

Update the lobby
public UpdateLobby ( Entities game, System.Boolean sendToSpectators ) : void
game Entities The game to update
sendToSpectators System.Boolean Should this update go to the spectators
return void

UpdateWaiting() public method

Update the waiting screen for the game
public UpdateWaiting ( Entities game, System.Boolean sendToSpectators ) : void
game Entities The game to update
sendToSpectators System.Boolean Should this update go to the spectators
return void

VoteComplete() public method

Alert the users a vote to kick has completed
public VoteComplete ( Int32 gameID, Entities kickedUser, Int32 votesToKick, Int32 votesNotToKick, System.Boolean isKicked ) : void
gameID System.Int32 The game ID
kickedUser Entities The user that was being voted on
votesToKick System.Int32 The number of votes to kick
votesNotToKick System.Int32 The number votes not to kick
isKicked System.Boolean Was the user kicked based on the votes
return void

Voted() public method

Alert the users a vote to kick has been placed
public Voted ( Int32 gameID, Entities kickedUser, Int32 votesToKick, Int32 votesNotToKick, List alreadyVoted ) : void
gameID System.Int32 The game ID
kickedUser Entities The user that was being voted on
votesToKick System.Int32 The number of votes to kick
votesNotToKick System.Int32 The number votes not to kick
alreadyVoted List UserIds for users that have already voted
return void