       fill:           'rgba(0,255,0,0.5)'
       selectable:     false
       tank_direction: 3
+      tank_turn_cnt:  0
 
   keyboard =
     tank1_left:  false

    keyboard[key] = false

  turn_tank = (tank, offset) ->
    # See http://javascript.about.com/od/problemsolving/a/modulobug.htm
    tank.tank_direction = (((tank.tank_direction + offset) % 4) + 4) % 4
    tank.setAngle tank.tank_direction * 90

  move_tank = (key_up, key_right, key_down, key_left, tank) ->
    if key_right

      fill:           'rgba(255,0,0,0.5)'
      selectable:     true
      tank_direction: 1
      tank_turn_cnt:  0

  new fabric.Image.fromURL 'tank2.png', (img) ->
    tank2 = img
