Exemplo n.º 1
0
    public string GetStorageContents()
    {
        var sb = new StringBuilder();

        sb.AppendLine("Player {0}: " + Id);

        var fullList = MoleculeStorages
                       .Join(Expertises, ms => ms.Id, e => e.Id, (ms, e) => new { ms.Id, StoredMoleculeCount = ms.MoleculeCount, ExpertiseCount = e.MoleculeCount });

        foreach (var molecule in fullList)
        {
            sb.AppendLine(string.Format("   Molecule {0}: {1} - ({2}).", molecule.Id, molecule.StoredMoleculeCount, molecule.ExpertiseCount));
        }

        return(sb.ToString());
    }
Exemplo n.º 2
0
 public override string ToString()
 {
     return(string.Format("Player {0}: Target-{1}, ETA-{2}, Score-{3}, MoleculeStorages-{4}, Expertises-{5}\nPriorTarget-{6}", Id, Target, ETA, Score, MoleculeStorages.Count(), Expertises.Count(), PriorTarget));
 }