TranspositionTable { int markNodesReachableFrom(SearchNode root) { if (root == null || root.isMarked()) { return 0; } root.setMarked(true); int sum = 1; ListNode<SearchNode> child = root.getChildren(); while (child != null) { sum += markNodesReachableFrom(child.getKey()); child = child.getNext(); } return sum; } TranspositionTable(int megabytes, SearchNodeBuilder builder,
			CoordinateSystem coords); int dagSize(SearchNode root); synchronized SearchNode findIfPresent(long fancyHash);  }
@Test public void testMarkNodesReachableFrom() { SearchNode a = table.findOrAllocate(0L); SearchNode b = table.findOrAllocate(1L); SearchNode c = table.findOrAllocate(2L); SearchNode d = table.findOrAllocate(3L); SearchNode e = table.findOrAllocate(4L); table.addChild(a, b); table.addChild(b, c); table.addChild(b, d); table.addChild(c, e); table.addChild(d, e); table.markNodesReachableFrom(b); assertFalse(a.isMarked()); assertTrue(b.isMarked()); assertTrue(c.isMarked()); assertTrue(d.isMarked()); assertTrue(e.isMarked()); }