⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imessagedistribute.cs

📁 经典游戏程序设计:visual c++ 上的杀人游戏源代码
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace ServerLib
{
    // NOTE: If you change the interface name "IMessageDistribute" here, you must also update the reference to "IMessageDistribute" in Web.config.
    [ServiceContract(Namespace = "KillPersonServerApp", Name = "MessageDistribution")]
    public interface IMessageDistribute
    {
        //nTime:Daytime and night, in Daytime, all person can send message to anyone
        //      At night, only bad guys can send messages to those persons who are also bad persons
        //nSenderID: The IdentityID of the sender.
        //According to the time and the role of sender, the server host decides which persons this messages will be send to.
        //-------------------------------------------
        //|     Time    |   Sender Role | Reciever  |
        //| DayTime     |   Civilian    | All       |
        //| DayTime     |   Bad person  | All       |
        //| DayTime     |   Dead person | All       |
        //| Night       |   Civilian    | None      |
        //| Night       |   Bad person  | Bad person|
        //| Night       |   Dead person | None      |
        //-------------------------------------------
        [OperationContract]
        bool DistribChatMsg(ChatFormat chat);

        //-------------------------------------------
        //|     Time    |   Sender Role | Valid?    |
        //| DayTime     |   Civilian    | Yes       |
        //| DayTime     |   Bad person  | Yes       |
        //| DayTime     |   Dead person | No        |
        //| Night       |   Civilian    | No        |
        //| Night       |   Bad person  | Yes       |
        //| Night       |   Dead person | No        |
        //-------------------------------------------
        [OperationContract]
        bool DistribVoteMsg(VoteFormat vote);

        //For server to broadcast news to client.
        [OperationContract]
        List<string> Logon(LogonFormat logon);
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -