 
   construct_piece: (sym) ->
     @sym = sym
-    @hexes = @get_hexes()
+    @hexes = @pattern.get_hexes()
     @hex_box.set_hex_box(sym)
     wd_ht = @hex_box.get_box_size()
     @width = wd_ht[0]
     @height = wd_ht[1]
     @redraw.reset_size(@width,@height)
-    @piece_mask.draw_piece_pattern()
+    @pattern.draw_piece_pattern()
     @cut_piece_from_photo()
     @draw_piece_ab(-7,5)
 

      @pstring = response.pstring
      grid = get_pattern_grid(@pstring)
      @mask = new MissingPiecesMask(app, grid)
      @piece = new PuzzlePiece(app)
      app.pz_status.start_new_puzzle()
  xhr.send()


      if aa%2 != anchor_a%2
        if anchor_a%2 == 0 then yy = yy+10 else yy = yy-10
      @hex_draw.fill_hex_xy(xx,yy,"#000000")


  get_hexes: () ->
    hexes = []
    for bb in [1..10]
      for aa in [1..24]
        hexes.push([aa,bb]) if @grid[bb][aa] == @sym
    return hexes



