Exemplo n.º 1
0
 public void Visualize(World world)
 {
     foreach (var monster in world.Enemies)
     {
         _graphics.DrawEllipse(new Pen(new SolidBrush(Color.Red)), (float)monster.Position.X, (float)monster.Position.Y, 10, 10);
     }
     _graphics.DrawEllipse(new Pen(new SolidBrush(Color.Blue)), (float)world.Player.Position.X, (float)world.Player.Position.Y, 10, 10);
     _graphics.DrawString(world.PendingActions.Count.ToString(), SystemFonts.DefaultFont, Brushes.Black, new PointF((float)10, (float)10) );
 }
Exemplo n.º 2
0
 public WindowsFormsVisualizer(System.Drawing.Graphics graphics, World world)
 {
     _graphics = graphics;
     _world = world;
 }