private Board2048 moveBoard(Board2048 board, int x, int y, int dx, int dy) {
		int origx = x, origy = y;
		// Change the board values
		while ((0 <= x && x <= (N - 1)) && (0 <= y && y <= (N - 1))) {
			board.setBoard(elimiZero(board.getBoard(), origy, origx, dy, dx));
			if (y + dy >= 0 && y + dy <= (N - 1) && x + dx >= 0
					&& x + dx <= (N - 1)) {
				if (board.getBoard(x, y) == board.getBoard(x + dx, y + dy)) {
					board.setBoard(x, y, board.getBoard(x, y) * 2);
					board.setBoard(x + dx, y + dy, 0);
					board.setScore(board.getScore() + board.getBoard(x, y));
					board.setBoard(elimiZero(board.getBoard(), origy, origx,
							dy, dx));
				}
			}
			x += dx;
			y += dy;
		}
		return board;
	}