C# Class YGOSharp.Game

Inheritance: IGame
Datei anzeigen Open project: IceYGO/ygosharp Class Usage Examples

Public Properties

Property Type Description
DuelCount int

Public Methods

Method Description
AddPlayer ( Player player ) : void
Chat ( Player player, string msg ) : void
CustomMessage ( Player player, string msg ) : void
End ( ) : void
EndDuel ( bool force ) : void
Game ( CoreServer server ) : System
HandResult ( Player player, int result ) : void
KickPlayer ( Player player, int pos ) : void
MatchIsEnd ( ) : bool
MatchKill ( ) : void
MatchSaveResult ( int player, int reason ) : void
MatchSide ( ) : void
MoveToDuelist ( Player player ) : void
MoveToObserver ( Player player ) : void
RefreshAll ( ) : void
RefreshAllObserver ( Player observer ) : void
RefreshExtra ( int player, int flag = 0x81fff ) : void
RefreshGrave ( int player, int flag = 0x81fff, Player observer = null ) : void
RefreshHand ( int player, int flag = 0x181fff, Player observer = null ) : void
RefreshMonsters ( int player, int flag = 0x81fff, Player observer = null ) : void
RefreshSingle ( int player, int location, int sequence, int flag = 0x781fff ) : void
RefreshSpells ( int player, int flag = 0x681fff, Player observer = null ) : void
RemovePlayer ( Player player ) : void
SendToAll ( BinaryWriter packet ) : void
SendToAllBut ( BinaryWriter packet, Player except ) : void
SendToAllBut ( BinaryWriter packet, int except ) : void
SendToObservers ( BinaryWriter packet ) : void
SendToPlayers ( BinaryWriter packet ) : void
SendToTeam ( BinaryWriter packet, int team ) : void
SetReady ( Player player, bool ready ) : void
SetResponse ( byte resp ) : void
SetResponse ( int resp ) : void
SetRules ( BinaryReader packet ) : void
Start ( ) : void
StartDuel ( Player player ) : void
Stop ( ) : void
Surrender ( Player player, int reason, bool force = false ) : void
TimeReset ( ) : void
TimeStart ( ) : void
TimeStop ( ) : void
TimeTick ( ) : void
TpResult ( Player player, bool result ) : void
WaitForResponse ( ) : int
WaitForResponse ( int player ) : void

Private Methods

Method Description
CalculateWinner ( ) : void
GetAvailablePlayerPos ( ) : int
HandleError ( string error ) : void
InitNewSpectator ( Player player ) : void
Process ( ) : void
SendDuelingPlayers ( Player player ) : void
SendHand ( ) : void
SendJoinGame ( Player player ) : void
ShuffleCards ( Random rand, IEnumerable cards ) : List

Method Details

AddPlayer() public method

public AddPlayer ( Player player ) : void
player Player
return void

Chat() public method

public Chat ( Player player, string msg ) : void
player Player
msg string
return void

CustomMessage() public method

public CustomMessage ( Player player, string msg ) : void
player Player
msg string
return void

End() public method

public End ( ) : void
return void

EndDuel() public method

public EndDuel ( bool force ) : void
force bool
return void

Game() public method

public Game ( CoreServer server ) : System
server CoreServer
return System

HandResult() public method

public HandResult ( Player player, int result ) : void
player Player
result int
return void

KickPlayer() public method

public KickPlayer ( Player player, int pos ) : void
player Player
pos int
return void

MatchIsEnd() public method

public MatchIsEnd ( ) : bool
return bool

MatchKill() public method

public MatchKill ( ) : void
return void

MatchSaveResult() public method

public MatchSaveResult ( int player, int reason ) : void
player int
reason int
return void

MatchSide() public method

public MatchSide ( ) : void
return void

MoveToDuelist() public method

public MoveToDuelist ( Player player ) : void
player Player
return void

MoveToObserver() public method

public MoveToObserver ( Player player ) : void
player Player
return void

RefreshAll() public method

public RefreshAll ( ) : void
return void

RefreshAllObserver() public method

public RefreshAllObserver ( Player observer ) : void
observer Player
return void

RefreshExtra() public method

public RefreshExtra ( int player, int flag = 0x81fff ) : void
player int
flag int
return void

RefreshGrave() public method

public RefreshGrave ( int player, int flag = 0x81fff, Player observer = null ) : void
player int
flag int
observer Player
return void

RefreshHand() public method

public RefreshHand ( int player, int flag = 0x181fff, Player observer = null ) : void
player int
flag int
observer Player
return void

RefreshMonsters() public method

public RefreshMonsters ( int player, int flag = 0x81fff, Player observer = null ) : void
player int
flag int
observer Player
return void

RefreshSingle() public method

public RefreshSingle ( int player, int location, int sequence, int flag = 0x781fff ) : void
player int
location int
sequence int
flag int
return void

RefreshSpells() public method

public RefreshSpells ( int player, int flag = 0x681fff, Player observer = null ) : void
player int
flag int
observer Player
return void

RemovePlayer() public method

public RemovePlayer ( Player player ) : void
player Player
return void

SendToAll() public method

public SendToAll ( BinaryWriter packet ) : void
packet System.IO.BinaryWriter
return void

SendToAllBut() public method

public SendToAllBut ( BinaryWriter packet, Player except ) : void
packet System.IO.BinaryWriter
except Player
return void

SendToAllBut() public method

public SendToAllBut ( BinaryWriter packet, int except ) : void
packet System.IO.BinaryWriter
except int
return void

SendToObservers() public method

public SendToObservers ( BinaryWriter packet ) : void
packet BinaryWriter
return void

SendToPlayers() public method

public SendToPlayers ( BinaryWriter packet ) : void
packet BinaryWriter
return void

SendToTeam() public method

public SendToTeam ( BinaryWriter packet, int team ) : void
packet BinaryWriter
team int
return void

SetReady() public method

public SetReady ( Player player, bool ready ) : void
player Player
ready bool
return void

SetResponse() public method

public SetResponse ( byte resp ) : void
resp byte
return void

SetResponse() public method

public SetResponse ( int resp ) : void
resp int
return void

SetRules() public method

public SetRules ( BinaryReader packet ) : void
packet BinaryReader
return void

Start() public method

public Start ( ) : void
return void

StartDuel() public method

public StartDuel ( Player player ) : void
player Player
return void

Stop() public method

public Stop ( ) : void
return void

Surrender() public method

public Surrender ( Player player, int reason, bool force = false ) : void
player Player
reason int
force bool
return void

TimeReset() public method

public TimeReset ( ) : void
return void

TimeStart() public method

public TimeStart ( ) : void
return void

TimeStop() public method

public TimeStop ( ) : void
return void

TimeTick() public method

public TimeTick ( ) : void
return void

TpResult() public method

public TpResult ( Player player, bool result ) : void
player Player
result bool
return void

WaitForResponse() public method

public WaitForResponse ( ) : int
return int

WaitForResponse() public method

public WaitForResponse ( int player ) : void
player int
return void

Property Details

DuelCount public_oe property

public int DuelCount
return int