Ejemplo n.º 1
0
 // the craft is replaced to his entry point in the cheese
 public void kill() {
   --lives;
   pos.x = cuttingEdge.getFirst().x;
   pos.y = cuttingEdge.getFirst().y;
   previousPos = pos;
   clearCuttingEdge();
 }
Ejemplo n.º 2
0
 public final void clearCuttingEdge() {
   cuttingEdge = new PointList(false);
   cuttingEdge.addVertexToEnd(getPosition());
 }
Ejemplo n.º 3
0
 public void deleteRedundantCuttingEdgePoints() {
   cuttingEdge.deleteRedundantPoints();
 }
Ejemplo n.º 4
0
 public boolean isOnCuttingEdge(Point p) {
   return cuttingEdge.isOnBorder(p);
 }
Ejemplo n.º 5
0
 public void addCuttingEdgePoint() {
   cuttingEdge.addVertexToEnd(getPosition());
   deleteRedundantCuttingEdgePoints();
 }