package net.ciklum.icfpc11.plan; import junit.framework.TestCase /** * blabla * * @author vic */ @Typed public class ConstantPlannerTest extends TestCase { void testFindPath() { def cp = new ConstantPlanner() def path = cp.findPath(5) assertEquals '(5)ZERO->0;SUCC->1;SUCC->2;DBL->4;SUCC->5', cp.pathToString(path) path = cp.findPath(10) assertEquals '(6)ZERO->0;SUCC->1;SUCC->2;DBL->4;SUCC->5;DBL->10', cp.pathToString(path) } // void testFindFarthestCells() { // def cp = new ConstantPlanner() // cp.findPath(255) // int max = cp.constants*.pathLength.max() // List problematic = cp.constants.findAll{ max - it.pathLength < 2 } // System.out.println problematic.collect { "${255-it.value}:${it.pathLength}" }.join('; ') // } }