Пример #1
0
        public GameCommon GetInfo()
        {
            GameCommon gc = new GameCommon();

            foreach (Fraction f in fractions)
            {
                FractionCommon fc = new FractionCommon();
                foreach (Entity e in f.Entities)
                {
                    EntityCommon ec = new EntityCommon(e.X, e.Y, e.Mass, e.id);
                    ec.moving = e.Moving;
                    ec.speed  = e.Speed;
                    fc.entities.Add(ec);
                }
                gc.AddFraction(fc);
            }

            return(gc);
        }
Пример #2
0
 public void AddFraction(FractionCommon f)
 {
     fractions.Add(f);
 }