kflorence / beaming

Beaming is a free, open source puzzle game that involves directing beams through a hexagonal grid.
https://kflorence.github.io/beaming/
Other
1 stars 0 forks source link

Fix state corruption on item swap #4

Closed kflorence closed 10 months ago

kflorence commented 10 months ago

https://kflorence.github.io/beaming/#/008/eJztV9FqgzAU_Zf7fAfRtmP4uIfBXkffJAxX74aQmhIjrIj_vmhtNRo3KxPG6Mslpcm5J4ebntMCkhgCYOwBEGISOsogCAsQ0VHmGoICdCIoqxZeVfyqJJr21TazbyeFVAZAUWwA9PFA5sNTIjQpKDkyZLxEeDVIEIFZ1edXPZDm2JbUPknzzADJA6VJ-nHi0nz9SNHeQKS5EK7CEZTUkU5kCoFfcrtvuzqhhSDj-E4BL0t03nZAtABWb2iON3fEljW3aE_n3SVqluthz1mwtfbtdTviNtR7fYdaXStNK3_oLQqO_pLwPq6WhF_hekn4NW6WhN_YD_q34RneJuc2Of9scrwfrOSF3gXttFSd32Y8O2tYW-to75q6wzKs0z0ruFhX2_jXpfuuf8eKOgxmumeDbb1CNhg1h0Iu9btebus_19ttZn_Tcr1LcQS7N5HT9GQ3Fg9tFHfQ6-k3qjEfy3Zj92OXMh6rJjefH6sGAl2bKCdznDAJ_Jz2n9OYPiHw7hEyqh4CxVsjXPWfABmUX3R0zWo

For some reason, after swapping items, if you click "undo" the state gets corrupted by duplicating the swapped item.

Here is another example that duplicated the items but did not corrupt the state:

https://kflorence.github.io/beaming/#/008/eJztVk1rhDAQ_S9znoJfC8VjD4Vey94kFLuZlkBWF43QRfzvTVazWbvR_WC99RKCTt6892bM2ILgkEIQPAMCJ6nyGtKsBZnvy0ZB2oISkmqzCY6LULR1jzalLCt9CD5lQxqlIg4ModxRIYpvG5cVjZSo4fY70glfKN9Cp8PiQ7rRUzSh-tWHzg85dJ13ixAZ6GSGkGGCPS0PoYms8TTXS4Tcrj-ZQcn5UwVMh3ktDc0SnyjIHKt3-pK0UVqJTh1gwM61T5xcU7UVRVNr7YMVtjTOgl6iW3xmWEeqUuVKlAWkSceYV_GUwDOaQ4msP04kOtoM__TUqHjZ9dTZuFBzrdIbZGy-M9dw1go7qYHTyC41zq02uspk4aLgGC0JH2G8JHyMyZLwCa6WhF-NP_1Hwwf43zmLdE54zDE3nca3xquQiqrr7oyp6ee7Wgfc04v1MKUfpu22uTVx8qjeTi3D8a6J47H9fltmPPbVCz0Vvuwzs39fbwWnH0jDBKEmg0l8rbXpuAgj6H4BOo8Bcg

kflorence commented 10 months ago

Related to https://github.com/benjamine/jsondiffpatch/issues/34