         else
           # show board
           showBoard(@board)
-
       else
         console.log "Invalid"
 

  true

noValidMove = (board) ->
  direction = 'right' #FIXME: Handle other directions
  newBoard = move(board, direction)
  if moveIsValid(board, newBoard)
    return false

move = (board, direction) ->
  newBoard = buildBoard()
  for i in [0..3]
    if direction is 'right' or direction is 'left'
      row = getRow(i, board)
      row = mergeCells(row, direction)
      row = collapseCells(row, direction)
      setRow(row, i, newBoard)
    else if direction is 'up' or direction is 'down'
      column = getCol(i, board)
      column = mergeCells(column, direction)
      column = collapseCells(column, direction)
      setCol(column, i, newBoard)

  newBoard

