         else if cell[b] isnt 0 then break
     cell
 
-  if direction is 'right' or direction is 'down'
+  if direction in ['right', 'down']
     merge cell
-  else if direction is 'left' or direction is 'up'
+  else if direction in ['left', 'up']
     merge(cell.reverse()).reverse()
 
 collapseCells = (cell, direction) ->
   cell = cell.filter (ele) -> ele isnt 0
   while cell.length < 4
-    if direction is 'right' or direction is 'down'
+    if direction in ['right', 'down']
       cell.unshift 0
-    else if direction is 'left' or direction is 'up'
+    else if direction in ['left', 'up']
       cell.push 0
   cell
 

  true

noValidMove = (board) ->
  newBoard = move(board, direction)
  if moveIsValid(board, newBoard)
    return false
  true

        else
          # show board
          showBoard(@board)

      else
        console.log "Invalid"

