Exemplo n.º 1
0
        public override SimFrame DrawTurn(Vec2 scale)
        {
            Debug.Trace("Text Simulator");

            SimFrame ret = new SimFrame { Error = false, ToBeDrawn = true, BackGround = Color.White };

            ret.AddText(String.Format("Value of E1 E2 Union: {0}", DefuzziedValue1.ToString()), new Vec2(100, 200), new SolidBrush(Color.Black));
            ret.AddText(String.Format("Value of E1 E2 Inter: {0}", DefuzziedValue2.ToString()), new Vec2(100, 230), new SolidBrush(Color.Black));

            return ret;
        }
Exemplo n.º 2
0
        public override SimFrame DrawTurn(Vec2 scale)
        {
            State = SimulatorStateEnum.Running;

                SimFrame ret = new SimFrame();

                for (int i = 0; i < _population; i++)
                {
                    ret.AddRenderable(
                        new Sprite("x"+i)
                            {
                                Picture =  _template.Picture,
                                Position = new Vec2(_doubles[i], i * _spacing)
                            });
                }

                ret.ToBeDrawn = true;

                return ret;
        }
Exemplo n.º 3
0
 public override SimFrame DrawTurn(SimFrame frame)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public override SimFrame DrawTurn(SimFrame frame)
 {
     return frame;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Draws a simulation instance using the previous frame
 /// </summary>
 /// <param name="frame">Previous frame</param>
 /// <returns>currentFrame</returns>
 public abstract SimFrame DrawTurn(SimFrame frame);
Exemplo n.º 6
0
 /// <summary>
 /// Adds the current TracePath to a Simframe
 /// </summary>
 /// <param name="ret"></param>
 internal void DrawTracePath(SimFrame ret)
 {
     if (TracePath != null)
         for (int i = 1; i < TracePath.Count; i++)
         {
             ret.AddRenderable(new Line(TracePath[i - 1].Position, TracePath[i].Position, new SolidBrush(Color.MediumBlue), .5f));
         }
 }