 showBoard = (board) ->
   for row in [0..3]
     for col in [0..3]
-      $(".r#{row}.c#{col} > div").html(board[row][col])
+      if board[row][col] is 0
+        $(".r#{row}.c#{col} > div").html("")
+      else
+        $(".r#{row}.c#{col} > div").html(board[row][col])
 
 printArray = (array) ->
   console.log "--- Start ---"


mergeCells = (row, direction) ->

  if direction is 'right'
    for a in [3...0]
      for b in [a-1..0]


          row[b] = 0
          break
        else if row[b] isnt 0 then break
    row

  if direction is 'right'
    merge row
  else if direction is 'left'
    merge(row.reverse()).reverse()

collapseCells = (row, direction) ->
  row = row.filter (ele) -> ele isnt 0
