     @canvas = document.getElementById "gorillas"
     @context = @canvas.getContext "2d"
     @color = '#00FFFF'
+    @padding = 1
     @buildings = []
 
   draw_buildings:()->
-    @draw_building(position) for position in [0, 101, 202, 303, 404, 505, 606, 707, 808, 909 ]
+    position = 0
+    for [1...10]
+      building = @draw_building(position)
+      position = building.end_position() + @padding
+
 
   draw_building:(x) ->
     building = new Building(@context)
 
-    y = Math.floor(Math.random()*215)
+    y = Math.floor(Math.random()*300)
     building.draw(x, y)
     @buildings.push building
+    return building
 
   draw_the_sun: ->
     sun = new Sun(@context)


  position_at_y:() ->
    return  640-@height

  draw:(@x, @y) ->
    @context.fillStyle = @color

class Building
  constructor:(context) ->
    @context = context
    @width = 90 + Math.floor(Math.random()*40)
    @base_height = 100
    @randomize_color()

  position_at_x:() ->
