Chaos game: Difference between revisions
Content added Content deleted
(Updates for modern Rust and some readability improvements) |
(→{{header|Java}}: cleanup) |
||
Line 1,149: | Line 1,149: | ||
public class ChaosGame extends JPanel { |
public class ChaosGame extends JPanel { |
||
class ColoredPoint extends Point { |
static class ColoredPoint extends Point { |
||
int colorIndex; |
int colorIndex; |
||
Line 1,193: | Line 1,193: | ||
stack.add(halfwayPoint(p1, p2, colorIndex)); |
stack.add(halfwayPoint(p1, p2, colorIndex)); |
||
} catch (EmptyStackException e) { |
} catch (EmptyStackException e) { |
||
e.printStackTrace(); |
|||
} |
} |
||
} |
} |