protected virtual void OnAgentMoved(AgentMovedEventArgs e)
 {
     EventHandler<AgentMovedEventArgs> eh = this.AgentMoved;
     if (eh != null)
         eh(this, e);
 }
Exemple #2
0
 void WW_AgentMoved(object sender, AgentMovedEventArgs e)
 {
     KB.Move(e.Direction, WW.Breeze, WW.Stench, WW.Glitter);
     this.splitContainer1.Panel2.AutoScrollPosition = new Point(
         WW.AgentPositionX * WW.SquareDimension - this.splitContainer1.Panel2.Width / 2 + WW.SquareDimension / 2,
         (WW.Columns - WW.AgentPositionY - 1) * WW.SquareDimension - this.splitContainer1.Panel2.Height / 2 + WW.SquareDimension / 2);
     Uspjesnost--;
     lblUspjesnost.Text = Uspjesnost.ToString();
     if (AgentIgra)
         WW.AgentMove(KB.BestMove());
 }