Example #1
0
        internal bool CreateGame(Difficulty difficulty, string gameName, string password, string description)
        {
            CreateGameEvent.Reset();
            Connection.WritePacket(new CreateGameRequestPacket(RequestId++, difficulty, gameName, password, description));
            var packet = CreateGameEvent.WaitForPacket(5000);

            if (packet == null)
            {
                return(false);
            }
            var result = new CreateGameResponsePacket(packet.Raw);

            return(result.ResultCode == 0x00);
        }
Example #2
0
 internal void CreateGame(Difficulty difficulty, string gameName, string password)
 {
     CreateGameEvent.Reset();
     Connection.WritePacket(new CreateGameRequestPacket(RequestId++, difficulty, gameName, password));
     _ = new CreateGameResponsePacket(CreateGameEvent.WaitForPacket().Raw);
 }