예제 #1
0
        public static string GetPlayersInfo(GameAction ra)
        {
            string text = "";
            foreach (Player pl in ra.Players)
            {

                text += string.Format("{0}, money={1} worth={2}<br />",
                    pl.htmlName,
                    pl.Money.PrintMoney(),
                    HTML.PrintWithColor(GameHelper.GetPlayerAssets(pl.Id, pl.Money, ra.Cells, true))
                    );

            }
            return text;
        }
예제 #2
0
파일: Game.cs 프로젝트: kolyan1981by/monop
        public void FixAction(string act)
        {
            var gameAction = new GameAction();

            gameAction.round = this.RoundNumber;
            gameAction.curr = this.Curr.Id;
            gameAction.cpos = this.Curr.Pos;
            gameAction.croll = this.LastRoll;
            gameAction.action = act;
            gameAction.Players = (
                from x in this.Players
                select (Player)x.Clone()).ToList<Player>();
            gameAction.Cells = (
                from x in this.Cells
                select (CellInf)x.Clone()).ToArray<CellInf>();
            gameAction.RandomCard = ((act == "random") ? this.LastRandomCard : null);

            RoundActions.Add(gameAction);
            //this.AddToLog(act);
        }