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; }
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); }