private void moveTiles(Direction dir) {
		boolean canMove = false;
		int horizontalDirection = 0;
		int verticalDirection = 0;
		Point empty = getEmpty();
		if (dir == Direction.LEFT) {
			horizontalDirection = -1;
			int row = empty.row;
			int col = empty.col + 1;
			if (isValidMove(row, col)) {
				if (!canMove) {
					canMove = move(row, col, horizontalDirection,
							verticalDirection, dir);
				} else {
					move(row, col, horizontalDirection, verticalDirection, dir);
				}
			}
		}
		if (dir == Direction.RIGHT) {
			horizontalDirection = 1;
			int row = empty.row;
			int col = empty.col - 1;
			if (isValidMove(row, col)) {
				if (!canMove) {
					canMove = move(row, col, horizontalDirection,
							verticalDirection, dir);
				} else {
					move(row, col, horizontalDirection, verticalDirection, dir);
				}
			}
		}
		if (dir == Direction.UP) {
			verticalDirection = -1;
			int row = empty.row + 1;
			int col = empty.col;
			if (isValidMove(row, col)) {
				if (!canMove) {
					canMove = move(row, col, horizontalDirection,
							verticalDirection, dir);
				} else {
					move(row, col, horizontalDirection, verticalDirection, dir);
				}
			}
		}
		if (dir == Direction.DOWN) {
			verticalDirection = 1;
			int row = empty.row - 1;
			int col = empty.col;
			if (isValidMove(row, col)) {
				if (!canMove) {
					canMove = move(row, col, horizontalDirection,
							verticalDirection, dir);
				} else {
					move(row, col, horizontalDirection, verticalDirection, dir);
				}
			}

		}
		for (int row = 0; row < ROWS; row++) {
			for (int col = 0; col < COLS; col++) {
				Tile current = board[row][col];
				if (current == null)
					continue;
				current.setCanCombine(true);

			}
		}
		if (canMove) {
			checkDead();
		}
	}