public void initPolys(){
  AffineTransform FacingRotate=new AffineTransform();
  Polygon facingPoly_tmp=new Polygon();
  facingPoly_tmp.addPoint(41,3);
  facingPoly_tmp.addPoint(35,9);
  facingPoly_tmp.addPoint(41,7);
  facingPoly_tmp.addPoint(42,7);
  facingPoly_tmp.addPoint(48,9);
  facingPoly_tmp.addPoint(42,3);
  facingPolys=new Shape[8];
  for (  int dir : allDirections) {
    facingPolys[dir]=FacingRotate.createTransformedShape(facingPoly_tmp);
    FacingRotate.rotate(Math.toRadians(60),HEX_W / 2,HEX_H / 2);
  }
  Polygon movementPoly_tmp=new Polygon();
  movementPoly_tmp.addPoint(47,67);
  movementPoly_tmp.addPoint(48,66);
  movementPoly_tmp.addPoint(42,62);
  movementPoly_tmp.addPoint(41,62);
  movementPoly_tmp.addPoint(35,66);
  movementPoly_tmp.addPoint(36,67);
  movementPoly_tmp.addPoint(47,67);
  movementPoly_tmp.addPoint(45,68);
  movementPoly_tmp.addPoint(38,68);
  movementPoly_tmp.addPoint(38,69);
  movementPoly_tmp.addPoint(45,69);
  movementPoly_tmp.addPoint(45,68);
  movementPoly_tmp.addPoint(45,70);
  movementPoly_tmp.addPoint(38,70);
  movementPoly_tmp.addPoint(38,71);
  movementPoly_tmp.addPoint(45,71);
  movementPoly_tmp.addPoint(45,68);
  FacingRotate.setToIdentity();
  movementPolys=new Shape[8];
  for (  int dir : allDirections) {
    movementPolys[dir]=FacingRotate.createTransformedShape(movementPoly_tmp);
    FacingRotate.rotate(Math.toRadians(60),HEX_W / 2,HEX_H / 2);
  }
  FacingRotate.setToIdentity();
  FacingRotate.translate(0,-31);
  upArrow=FacingRotate.createTransformedShape(movementPoly_tmp);
  FacingRotate.setToIdentity();
  FacingRotate.rotate(Math.toRadians(180),HEX_W / 2,HEX_H / 2);
  FacingRotate.translate(0,-31);
  downArrow=FacingRotate.createTransformedShape(movementPoly_tmp);
}

public void initPolys ( ) { AffineTransform FacingRotate = new AffineTransform ( ) ; Polygon facingPoly_tmp = new Polygon ( ) ; facingPoly_tmp . addPoint ( 41 , 3 ) ; facingPoly_tmp . addPoint ( 35 , 9 ) ; facingPoly_tmp . addPoint ( 41 , 7 ) ; facingPoly_tmp . addPoint ( 42 , 7 ) ; facingPoly_tmp . addPoint ( 48 , 9 ) ; facingPoly_tmp . addPoint ( 42 , 3 ) ; facingPolys = new Shape [ 8 ] ; for ( int dir : allDirections ) { facingPolys [ dir ] = FacingRotate . createTransformedShape ( facingPoly_tmp ) ; FacingRotate . rotate ( Math . toRadians ( 60 ) , HEX_W / 2 , HEX_H / 2 ) ; } Polygon movementPoly_tmp = new Polygon ( ) ; movementPoly_tmp . addPoint ( 47 , 67 ) ; movementPoly_tmp . addPoint ( 48 , 66 ) ; movementPoly_tmp . addPoint ( 42 , 62 ) ; movementPoly_tmp . addPoint ( 41 , 62 ) ; movementPoly_tmp . addPoint ( 35 , 66 ) ; movementPoly_tmp . addPoint ( 36 , 67 ) ; movementPoly_tmp . addPoint ( 47 , 67 ) ; movementPoly_tmp . addPoint ( 45 , 68 ) ; movementPoly_tmp . addPoint ( 38 , 68 ) ; movementPoly_tmp . addPoint ( 38 , 69 ) ; movementPoly_tmp . addPoint ( 45 , 69 ) ; movementPoly_tmp . addPoint ( 45 , 68 ) ; movementPoly_tmp . addPoint ( 45 , 70 ) ; movementPoly_tmp . addPoint ( 38 , 70 ) ; movementPoly_tmp . addPoint ( 38 , 71 ) ; movementPoly_tmp . addPoint ( 45 , 71 ) ; movementPoly_tmp . addPoint ( 45 , 68 ) ; FacingRotate . setToIdentity ( ) ; movementPolys = new Shape [ 8 ] ; for ( int dir : allDirections ) { movementPolys [ dir ] = FacingRotate . createTransformedShape ( movementPoly_tmp ) ; FacingRotate . rotate ( Math . toRadians ( 60 ) , HEX_W / 2 , HEX_H / 2 ) ; } FacingRotate . setToIdentity ( ) ; FacingRotate . translate ( 0 , - 31 ) ; upArrow = FacingRotate . createTransformedShape ( movementPoly_tmp ) ; FacingRotate . setToIdentity ( ) ; FacingRotate . rotate ( Math . toRadians ( 180 ) , HEX_W / 2 , HEX_H / 2 ) ; FacingRotate . translate ( 0 , - 31 ) ; downArrow = FacingRotate . createTransformedShape ( movementPoly_tmp ) ; }
initializes the various overlay polygons with their vertices .
