1 package de.lathanda.eos.game.geom;
12 class ShapeOrder
implements Comparable<ShapeOrder> {
46 public final double value;
50 public final Bracket bracket;
54 public final Shape shape;
62 public ShapeOrder(OrderType type,
Shape shape) {
67 bracket = Bracket.OPEN;
71 bracket = Bracket.CLOSE;
75 bracket = Bracket.OPEN;
79 bracket = Bracket.CLOSE;
89 bracket = Bracket.OPEN;
91 System.err.println(
"unknown order type occured, incomplete code change");
101 public int compareTo(ShapeOrder o) {
102 double diff = value - o.value;
105 }
else if (diff > 0) {
112 int result = shape.
id - o.shape.id;
116 return bracket.order - o.bracket.order;
127 public String toString() {
128 StringBuilder result =
new StringBuilder();
131 result.append(
"open");
134 result.append(
"close");
136 result.append(value);
137 return result.toString();
Integer id
ID des zugehörigen Weltobjekts.