Пример #1
0
 /// <summary>
 /// Ведущий
 /// </summary>
 /// <returns></returns>
 public string Showman() => $"<showman>{ReplicManager.Escape(_gameData.ShowMan.Name)}</showman>";
Пример #2
0
        virtual public void Stage()
        {
            switch (_data.Stage)
            {
            case GameStage.Before:
                break;

            case GameStage.Begin:
                TInfo.TStage = TableStage.Sign;

                if (_data.BackLink.MakeLogs && _data.ProtocolWriter == null)
                {
                    try
                    {
                        var stream = _data.BackLink.CreateLog(_actor.Client.Name, out string path);
                        _data.ProtocolPath   = path;
                        _data.ProtocolWriter = new StreamWriter(stream);
                        _data.ProtocolWriter.Write("<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/><title>" + _actor.LO[nameof(R.LogTitle)] + "</title></head><body style=\"font-face: Verdana\">");
                    }
                    catch (IOException)
                    {
                    }
                    catch (ArgumentException exc)
                    {
                        _data.BackLink.OnError(exc);
                    }
                    catch (UnauthorizedAccessException exc)
                    {
                        _data.BackLink.OnError(exc);
                    }
                }

                Print(ReplicManager.Special(_actor.LO[nameof(R.GameStarted)] + " " + DateTime.Now.ToString()));
                break;

            case GameStage.Round:
            case GameStage.Final:
                TInfo.TStage = TableStage.Round;
                _data.Sound  = "beginround";

                foreach (var item in _data.Players)
                {
                    item.State = PlayerState.None;
                    item.Stake = 0;

                    item.SafeStake = false;
                }
                break;

            case GameStage.After:
                if (_data.ProtocolWriter != null)
                {
                    _data.ProtocolWriter.Write("</body></html>");
                }
                else
                {
                    _data.OnAddString(null, _actor.LO[nameof(R.ErrorWritingLogs)], LogMode.Chat);
                }
                break;

            default:
                break;
            }
        }
Пример #3
0
 /// <summary>
 /// Зритель
 /// </summary>
 /// <param name="s"></param>
 /// <returns></returns>
 public static string Viewer(string s) => $"<viewer>{ReplicManager.Escape(s)}</viewer>";