The doubles form an exception: their difference is zero and if moved in line they wouldnt change the sum. Since they have to be moved always across, they double the end. That doesnt mean that e. g. double-8 adds 16 (two ends of 8) to the sum. It only adds 8, because the former open end is closed when moving the double to it. So the sum decreases by 8 while adding the 16 of the double (-8+16=+8). If this looks too complicated, simply note: double-8 adds 8, double-9 adds 9 etc.
From the doubles the game can continue into four directions, i. e. also at the »naked« fourth side. By moving there, a new end is increasing the sum (no decreasing possible), and its the only occasion when the difference of the domino is not valuable: simply the number of the new end will be added:
With this third possibility to move the 18-8, the sum is 52 (four ends 18 + 18 + 8 + 8).