public SingleHost(int adminId, Game.GameSettings settings) { host = new Host(settings); host.SendInformation += (info, ids) => OnMessageSent(info.ToMessage(), ids); host.PropertyChanged += (sender, e) => { if (e.PropertyName == Host.CAN_START_GAME) ((Host)sender).StartGame(); }; user = new Player(adminId); user.SendCommand += (command) => OnMessageSent(command.ToMessage(), adminId); user.Quited += () => host.CloseRoom(); }
public SingleClient(int hostId, Game.GameSettings settings) { HostId = hostId; user = new Player(hostId); user.SendCommand += (command) => OnMessageSent(command.ToMessage(), HostId); }