Пример #1
0
 public MetaRoom(RoomType roomType, RoomMessageManaer messageManaer, List <RoomRole> roles)
 {
     this.id            = CommonUtil.getUUID();
     this.messageManaer = messageManaer;
     this.roomType      = roomType;
     this.roles         = roles;
 }
Пример #2
0
 public RoomTwoPlayer(RoomType roomType, RoomMessageManaer messageManaer, List <RoomRole> roles)
     : base(roomType, messageManaer, roles)
 {
     if (RoomType.TWO_PLAYER != roomType)
     {
         throw new Exception("要求创建的房间类型不匹配");
     }
     if (roles.Count != 2)
     {
         throw new Exception("要求创建的人数不符合");
     }
     this.playerOne = (TwoPlayerRoomRole)roles[0];
     this.playerTwo = (TwoPlayerRoomRole)roles[1];
 }
Пример #3
0
 public Room(RoomType roomType, RoomMessageManaer messageManaer, List <RoomRole> roles)
     : base(roomType, messageManaer, roles)
 {
 }