       gs.addEntity(@blocks)
       pusher.connection.bind 'connected', ->
         gs.addEntity(Tetris.Shape.randomShape(x:0, y:0, color: {r:0, g:0, b:0}, owned: true))
+  
   class Level
     constructor: ->
     draw: () ->

      
    draw: (c) -> 
      block.draw(c) for block in @blocks
      
  class Tetris.Block
    constructor: (opts={})->

          rotation: @rotation
      
        
    blockPosition: (blockNumber, rotation=null) ->
       definition = @shapeDefinition(rotation || @rotation)[blockNumber]
       x = @x + definition[0] 
       y = @y + definition[1]
       {x: x, y: y}
    
    canMoveDown: ->
      floor = Tetris.height - 1
      for i in [0,1,2,3]
        return false if @blockPosition(i).y == floor
      return @canMoveTo(0, +1)
      
    canMoveTo: (xOffset, yOffset, rotation=null) ->
      for i in [0,1,2,3]
        x = @blockPosition(i, rotation).x + xOffset
        y = @blockPosition(i, rotation).y + yOffset
        console.log(x,y, Tetris.blocks.contains(x, y))
        return false if Tetris.blocks.contains(x, y)
      return true
    
    draw: (c) ->
