title: removing all nodes of a type within a GridPane
body: <p>I'm trying to build a checkers game and I'm currently trying to implement the moving of the pieces.
  To do this I decided I'd keep a list of where the pieces should be:
  <code>blackPieces</code>
  <code>whitePieces</code></p>
  
  <p>Then when a movement is made I would:</p>
  
  <ol>
  <li>update the relevant list</li>
  <li>loop through all the children of the GridPane</li>
  <li>remove all the checkers pieces i.e. all Nodes of type Circle</li>
  <li>add new pieces according to relevant list</li>
  </ol>
  
  <p>However, I'm stuck at step 3, with the following Groovy code I simply get a <strong>ConcurrentModificationException</strong></p>
  
  <pre><code>def children = board.getChildren()
  for (child in children) {
      if (child instanceof Circle) {
          board.getChildren().remove(child)
      }
  }
  </code></pre>
  
  <p>Is there a way to do this without redrawing the entire scene?</p>
  
  <p>Appreciate any help!</p>