Exemple #1
0
        /// <summary>
        /// The guest accepted the game
        /// </summary>
        /// <param name="guest">The player accepting the game</param>
        public void AcceptGame(Mobile guest)
        {
            if (Owner == null)
            {
                guest.SendMessage(0x40, "Your partner canceled the game");
                return;
            }

            m_GameStart = DateTime.Now;
            m_Timer.OnGameStart();

            m_Status = GameStatus.WhiteToMove;

            Guest = guest;

            Owner.CloseGump(typeof(Arya.Chess.StartGameGump));

            m_Board = new BChessboard(m_Black, m_White, m_Z, m_Bounds, this, m_Parent.ChessSet, m_Parent.WhiteHue, m_Parent.BlackHue, m_Parent.WhiteMinorHue, m_Parent.BlackMinorHue, m_Parent.OverrideMinorHue);

            m_MoveTime = DateTime.Now;

            // Create the region
            m_Region = new ChessRegion(m_Parent.Map, this, m_AllowSpectators, m_Bounds, m_Z);
            m_Region.Register();

            SendAllGumps(null, null);
        }
Exemple #2
0
        /// <summary>
        /// Creates a new chess piece object
        /// </summary>
        /// <param name="board">The BChessboard object hosting this piece</param>
        /// <param name="color">The color of this piece</param>
        /// <param name="position">The initial position on the board</param>
        public BaseChessPiece(BChessboard board, ChessColor color, Point2D position)
        {
            m_BChessboard = board;
            m_Color       = color;
            m_Position    = position;

            CreatePiece();
        }
Exemple #3
0
        /// <summary>
        /// The guest accepted the game
        /// </summary>
        /// <param name="guest">The player accepting the game</param>
        public void AcceptGame(Mobile guest)
        {
            if (guest == null)
            {
                return;
            }

            if (Owner == null)
            {
                guest.SendMessage(0x40, "Your partner canceled the game");
                return;
            }

            if (m_Timer == null)
            {
                return;
            }

            m_GameStart = DateTime.Now;

            m_Timer.OnGameStart();

            m_Status = GameStatus.WhiteToMove;

            Guest = guest;

            Owner.CloseGump(typeof(Arya.Chess.StartGameGump));

            m_Board = new BChessboard(m_Black, m_White, m_Z, m_Bounds, this, m_Parent.ChessSet, m_Parent.WhiteHue, m_Parent.BlackHue, m_Parent.WhiteMinorHue, m_Parent.BlackMinorHue, m_Parent.OverrideMinorHue);

            m_MoveTime = DateTime.Now;

            Rectangle3D m_NewBounds = Server.Region.ConvertTo3D(m_Bounds);

            Point3D start = m_NewBounds.Start;
            Point3D end   = m_NewBounds.End;

            start.Z = m_Z - 5;
            end.Z   = m_Z + 5;

            m_NewBounds = new Rectangle3D(start, end);

            // Create the region
            m_Region = new ChessRegion(m_Parent.Map, this, m_AllowSpectators, m_Parent.SafeZone, m_NewBounds, m_Z);
            m_Region.Register();

            SendAllGumps(null, null);
        }
Exemple #4
0
		/// <summary>
		/// The guest accepted the game
		/// </summary>
		/// <param name="guest">The player accepting the game</param>
		public void AcceptGame( Mobile guest )
		{
            if ( guest == null )
                return;

			if ( Owner == null )
			{
				guest.SendMessage( 0x40, "Your partner canceled the game" );
				return;
			}

            if (m_Timer == null)
                return;

			m_GameStart = DateTime.Now;

    	    m_Timer.OnGameStart();

			m_Status = GameStatus.WhiteToMove;

			Guest = guest;

			Owner.CloseGump( typeof( Arya.Chess.StartGameGump ) );

			m_Board = new BChessboard( m_Black, m_White, m_Z, m_Bounds, this, m_Parent.ChessSet, m_Parent.WhiteHue, m_Parent.BlackHue, m_Parent.WhiteMinorHue, m_Parent.BlackMinorHue, m_Parent.OverrideMinorHue );

			m_MoveTime = DateTime.Now;

            Rectangle3D m_NewBounds = Server.Region.ConvertTo3D(m_Bounds);

		    Point3D start = m_NewBounds.Start;
		    Point3D end = m_NewBounds.End;

            start.Z = m_Z - 5;
            end.Z = m_Z + 5;

            m_NewBounds = new Rectangle3D(start, end);

			// Create the region
            m_Region = new ChessRegion(m_Parent.Map, this, m_AllowSpectators, m_Parent.SafeZone, m_NewBounds, m_Z);
			m_Region.Register();

			SendAllGumps( null, null );
		}
Exemple #5
0
 public Rook(BChessboard board, ChessColor color, Point2D position) : base(board, color, position)
 {
 }
		/// <summary>
		/// Creates a new chess piece object
		/// </summary>
		/// <param name="board">The BChessboard object hosting this piece</param>
		/// <param name="color">The color of this piece</param>
		/// <param name="position">The initial position on the board</param>
		public BaseChessPiece( BChessboard board, ChessColor color, Point2D position )
		{
			m_BChessboard = board;
			m_Color = color;
			m_Position = position;

			CreatePiece();
		}
Exemple #7
0
		public Queen( BChessboard board, ChessColor color, Point2D position ) : base( board, color, position )
		{
		}
Exemple #8
0
		/// <summary>
		/// The guest accepted the game
		/// </summary>
		/// <param name="guest">The player accepting the game</param>
		public void AcceptGame( Mobile guest )
		{
			if ( Owner == null )
			{
				guest.SendMessage( 0x40, "Your partner canceled the game" );
				return;
			}

			m_GameStart = DateTime.Now;
			m_Timer.OnGameStart();

			m_Status = GameStatus.WhiteToMove;

			Guest = guest;

			Owner.CloseGump( typeof( Arya.Chess.StartGameGump ) );

			m_Board = new BChessboard( m_Black, m_White, m_Z, m_Bounds, this, m_Parent.ChessSet, m_Parent.WhiteHue, m_Parent.BlackHue, m_Parent.WhiteMinorHue, m_Parent.BlackMinorHue, m_Parent.OverrideMinorHue );

			m_MoveTime = DateTime.Now;

			// Create the region
			m_Region = new ChessRegion( m_Parent.Map, this, m_AllowSpectators, m_Bounds, m_Z );
			m_Region.Register();

			SendAllGumps( null, null );
		}
Exemple #9
0
		public Knight( BChessboard board, ChessColor color, Point2D position ) : base( board, color, position )
		{
		}
Exemple #10
0
		public Bishop( BChessboard board, ChessColor color, Point2D position ) : base( board, color, position )
		{
		}