public void MoveEscaper(EscaperBase escaper, Cell cell)
 {
     PositionEscaperInsideCell(_escapers[escaper], cell);
     Canvas.UpdateLayout();
 }
Example #2
0
 public void MoveEscaper(EscaperBase escaper, Cell cell)
 {
     Action<EscaperBase, Cell> me = _mainPage.MazeCanvas.MoveEscaper;
     _mainPage.Dispatcher.BeginInvoke(me, escaper, cell);
 }
 public void DrawEscaper(EscaperBase escaper)
 {
     Debug.Assert(_currentMaze != null, "A maze must be drawn first!");
     // The figure corresponding to the escaper.
     var figure = new Ellipse();
     // We register the escaper and the corresponding figure;
     // we will use the reference to the figure to move the escaper around.
     _escapers.Add(escaper, figure);
     // The escaper is drawn inside the entrance.
     PositionEscaperInsideCell(figure, _currentMaze.Entrance);
     Canvas.Children.Add(figure);
 }