Exemplo n.º 1
0
        public override void OnDelete()
        {
            if (m_Game != null)
            {
                m_Game.Cleanup();
            }

            base.OnDelete();
        }
Exemplo n.º 2
0
        /// <summary>
        /// The staff deleted a piece from the BChessboard, so clean up the game
        /// </summary>
        public void OnStaffDelete()
        {
            if (m_Black != null)
            {
                m_Black.SendMessage(0x40, "Your game has been terminated by the staff");
            }

            if (m_White != null)
            {
                m_White.SendMessage(0x40, "Your game has been terminated by the staff");
            }

            m_Game.Cleanup();
        }
Exemplo n.º 3
0
 public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
 {
     if (info.ButtonID == 1)
     {
         if (m_GameOver)
         {
             // Reset the game
             m_Game.NotifyGameOver(sender.Mobile);
         }
         else
         {
             // Force end the game
             m_Game.Cleanup();
         }
     }
 }
Exemplo n.º 4
0
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            switch (info.ButtonID)
            {
            case 1:                      // Make move
                sender.Mobile.SendGump(new GameGump(sender.Mobile, m_Game, m_Color, m_Message, m_Move, m_Moving));
                break;

            case 2:                     // Chess Help
                sender.Mobile.SendGump(new ChessHelpGump(sender.Mobile));
                sender.Mobile.SendGump(this);
                break;

            case 3:                     // End game
                m_Game.Cleanup();
                break;
            }
        }