@Test public void testDetectEverywhere() throws Exception { CollisionPosition theColPos = CollisionPosition.EVERYWHERE; Position thePosition1 = new Position(10, 10); Position thePosition2 = new Position(20, 20); assertTrue(theColPos.detect(thePosition1, thePosition2)); }
public abstract boolean detect(Position aInstance1, Position aInstance2);
CollisionPosition { public abstract boolean detect(Position aInstance1, Position aInstance2); }
CollisionPosition { public abstract boolean detect(Position aInstance1, Position aInstance2); CollisionPosition(String aName); }
CollisionPosition { public abstract boolean detect(Position aInstance1, Position aInstance2); CollisionPosition(String aName); String name(); @Override String toString(); abstract boolean detect(Position aInstance1, Position aInstance2); static CollisionPosition valueOf(String aName); static CollisionPosition[] values(); }
CollisionPosition { public abstract boolean detect(Position aInstance1, Position aInstance2); CollisionPosition(String aName); String name(); @Override String toString(); abstract boolean detect(Position aInstance1, Position aInstance2); static CollisionPosition valueOf(String aName); static CollisionPosition[] values(); static final CollisionPosition EVERYWHERE; static final CollisionPosition TOP; static final CollisionPosition BOTTOM; static final CollisionPosition LEFT; static final CollisionPosition RIGHT; }