public ScoreGump( Mobile m, ChessGame game, int[] white, int[] black, int totwhite, int totblack ) : base( 0, 25 ) { m.CloseGump( typeof( ScoreGump ) ); m_Game = game; MakeGump( white, black, totwhite, totblack ); }
public EndGameGump( Mobile m, ChessGame game, bool over, string details, int timeout ) : base( 200, 200 ) { m.CloseGump( typeof( EndGameGump ) ); m_Game = game; m_GameOver = over; this.Closable=false; this.Disposable=true; this.Dragable=true; this.Resizable=false; this.AddPage(0); this.AddBackground(0, 0, 265, 160, 9250); this.AddImageTiled(0, 0, 265, 160, 9304); this.AddImageTiled(1, 1, 263, 158, 9274); this.AddAlphaRegion(1, 1, 263, 158); // Button 1 : End Game this.AddButton(10, 127, 5601, 5605, 1, GumpButtonType.Reply, 0); this.AddLabel(10, 10, LabelHue, string.Format( "This game is : {0}", over ? "Over" : "Pending" ) ); this.AddLabel(10, 30, LabelHue, @"Details"); this.AddLabel(30, 55, GreenHue, details); this.AddLabel(30, 125, LabelHue, @"End Game"); if ( timeout > -1 ) { this.AddLabel(10, 80, LabelHue, string.Format( "Wait {0} minutes before the game ends", timeout ) ); this.AddLabel(10, 95, LabelHue, @"automatically. Do not close this gump."); } }
public ChessTimer( ChessGame game ) { m_Game = game; m_Timer = new InternalTimer( this ); m_Timer.Start(); m_GameStart = DateTime.Now; }
public ChessTarget( ChessGame game, Mobile m, string message, ChessTargetCallback callback ) : base( -1, true, TargetFlags.None ) { m_Message = message; m_Callback = callback; m_Game = game; if ( message != null ) m.SendMessage( 0x40, message ); }
public StartGameGump(Mobile m, ChessGame game, bool isOwner, bool allowSpectators) : base(200, 200) { m_Game = game; m_User = m; m_IsOwner = isOwner; m_AllowSpectators = allowSpectators; m_User.CloseGump(typeof(StartGameGump)); MakeGump(); }
public StartGameGump( Mobile m, ChessGame game, bool isOwner, bool allowSpectators ) : base( 200, 200 ) { m_Game = game; m_User = m; m_IsOwner = isOwner; m_AllowSpectators = allowSpectators; m_User.CloseGump( typeof( StartGameGump ) ); MakeGump(); }
public ChessTarget(ChessGame game, Mobile m, string message, ChessTargetCallback callback) : base(-1, true, TargetFlags.None) { m_Message = message; m_Callback = callback; m_Game = game; if (message != null) { m.SendMessage(0x40, message); } }
public ChessRegion( Map map, ChessGame game, bool allowSpectators, Rectangle2D bounds, int height ) : base("Chessboard", map, 100, GetArea(bounds)) { m_Game = game; m_AllowSpectators = allowSpectators; // Make the region larger so that people can't cast invisibility outside m_Bounds = new Rectangle2D( bounds.X - 12, bounds.Y - 12, bounds.Width + 24, bounds.Height + 24 ); m_BoardBounds = bounds; m_Height = height; }
public ChessRegion(Map map, ChessGame game, bool allowSpectators, Rectangle2D bounds, int height) : base("Chessboard", map, 100, GetArea(bounds)) { m_Game = game; m_AllowSpectators = allowSpectators; // Make the region larger so that people can't cast invisibility outside m_Bounds = new Rectangle2D(bounds.X - 12, bounds.Y - 12, bounds.Width + 24, bounds.Height + 24); m_BoardBounds = bounds; m_Height = height; }
public ChessSetGump( Mobile m, ChessGame game, bool isOwner, bool allowSpectators, int page ) : base( 200, 200 ) { m_Game = game; m_User = m; m_IsOwner = isOwner; m_AllowSpectators = allowSpectators; m_Page = page; m_User.CloseGump( typeof( ChessSetGump ) ); MakeGump(); }
public ChessSetGump(Mobile m, ChessGame game, bool isOwner, bool allowSpectators, int page) : base(200, 200) { m_Game = game; m_User = m; m_IsOwner = isOwner; m_AllowSpectators = allowSpectators; m_Page = page; m_User.CloseGump(typeof(ChessSetGump)); MakeGump(); }
public GameGump( Mobile m, ChessGame game, ChessColor color, string message, bool move, bool moving ): base( 60, 25 ) { m.CloseGump( typeof( GameGump ) ); m_Game = game; m_Message = message; m_Color = color; m_Move = move; m_Moving = moving; if ( move && ! moving ) m_Game.SendMoveTarget( m ); MakeGump(); }
public GameGump(Mobile m, ChessGame game, ChessColor color, string message, bool move, bool moving) : base(60, 25) { m.CloseGump(typeof(GameGump)); m_Game = game; m_Message = message; m_Color = color; m_Move = move; m_Moving = moving; if (move && !moving) { m_Game.SendMoveTarget(m); } MakeGump(); }
public ChessRegion(Map map, ChessGame game, bool allowSpectators, Rectangle2D bounds, int height) : base("", "Chessboard", map) { m_Game = game; m_AllowSpectators = allowSpectators; // Make the region larger so that people can't cast invisibility outside m_Bounds = new Rectangle2D(bounds.X - 12, bounds.Y - 12, bounds.Width + 24, bounds.Height + 24); m_BoardBounds = bounds; m_Height = height; this.MinZ = sbyte.MinValue; this.MaxZ = sbyte.MaxValue; this.Priority = 100; Coords = new ArrayList(); Coords.Add(m_Bounds); }
public ChessRegion( Map map, ChessGame game, bool allowSpectators, bool safeZone, Rectangle3D bounds, int height ) : base( "Chessboard", map, 100, bounds ) { m_Game = game; m_AllowSpectators = allowSpectators; m_SafeZone = safeZone; m_BoardBounds = bounds; // Make the region larger so that people can't cast invisibility outside // m_Bounds = new Rectangle2D( bounds.X - 12, bounds.Y - 12, bounds.Width + 24, bounds.Height + 24 ); // m_BoardBounds = bounds; m_Height = height; if (!m_AllowSpectators) ForceExpel(); // Coords = new ArrayList(); // Coords.Add( m_Bounds ); }
public ChessRegion( Map map, ChessGame game, bool allowSpectators, Rectangle2D bounds, int height ) : base("", "Chessboard", map) { m_Game = game; m_AllowSpectators = allowSpectators; // Make the region larger so that people can't cast invisibility outside m_Bounds = new Rectangle2D( bounds.X - 12, bounds.Y - 12, bounds.Width + 24, bounds.Height + 24 ); m_BoardBounds = bounds; m_Height = height; this.MinZ = sbyte.MinValue; this.MaxZ = sbyte.MaxValue; this.Priority = 100; Coords = new ArrayList(); Coords.Add( m_Bounds ); }
public ChessRegion(Map map, ChessGame game, bool allowSpectators, bool safeZone, Rectangle3D bounds, int height) : base("Chessboard", map, 100, bounds) { m_Game = game; m_AllowSpectators = allowSpectators; m_SafeZone = safeZone; m_BoardBounds = bounds; // Make the region larger so that people can't cast invisibility outside // m_Bounds = new Rectangle2D( bounds.X - 12, bounds.Y - 12, bounds.Width + 24, bounds.Height + 24 ); // m_BoardBounds = bounds; m_Height = height; if (!m_AllowSpectators) { ForceExpel(); } // Coords = new ArrayList(); // Coords.Add( m_Bounds ); }
public BChessboard( Mobile black, Mobile white, int z, Rectangle2D bounds, ChessGame game, ChessSet chessSet, int whiteHue, int blackHue, int whiteMinorHue, int blackMinorHue, bool overrideMinorHue ) { m_Game = game; m_Black = black; m_White = white; m_ChessSet = chessSet; m_WhiteHue = whiteHue; m_BlackHue = blackHue; m_WhiteMinorHue = whiteMinorHue; m_BlackMinorHue = blackMinorHue; m_Orientation = m_Game.Orientation; m_OverrideMinorHue = overrideMinorHue; m_Map = m_Black.Map; m_Z = z; m_Table = new Hashtable(); m_CapturedPieces = new ArrayList(); m_Bounds = bounds; m_Step = bounds.Width / 8; m_Offset = m_Step / 2; PlacePieces(); }
public ChessSetGump( Mobile m, ChessGame game, bool isOwner, bool allowSpectators ) : this( m, game, isOwner, allowSpectators, 0 ) { }
public PawnPromotionGump(Mobile m, ChessGame game) : base(200, 200) { m.CloseGump(typeof(PawnPromotionGump)); m_Game = game; MakeGump(); }
public void OnGameOver() { m_Game = null; InvalidateProperties(); }
public PawnPromotionGump( Mobile m, ChessGame game ) : base( 200, 200 ) { m.CloseGump( typeof( PawnPromotionGump ) ); m_Game = game; MakeGump(); }
public override void OnDoubleClick(Mobile from) { if ( m_Bounds.Width == 0 ) { // Not configured yet if ( from.AccessLevel >= AccessLevel.GameMaster ) { from.Target = new ChessTarget( from, "Target the north west corner of the chessboard you wish to create", OnBoardTarget ); } else { from.SendMessage( 0x40, "This chess board isn't ready for a game yet. Please contact a game master for assistance with its configuration." ); } } else if ( m_Game != null ) { if ( m_Game.IsPlayer( from ) && m_Game.AllowGame ) m_Game.SendAllGumps( null, null ); else from.SendMessage( 0x40, "A chess game is currently in progress. Please try again later." ); } else { m_Game = new ChessGame( this, from, m_Bounds, m_BoardHeight ); InvalidateProperties(); } }
public ChessSetGump(Mobile m, ChessGame game, bool isOwner, bool allowSpectators) : this(m, game, isOwner, allowSpectators, 0) { }