A 32-bit FNV-1a checksum of a state value, stable across machines and across property order.
import { stateChecksum } from '@datamoc/mw_games/core';// same state, whatever order the keys happen to be instateChecksum({ hp: 7, x: 2 }) === stateChecksum({ x: 2, hp: 7 }); // truestateChecksum({ hp: 7 }) === stateChecksum({ hp: 6 }); // false Copy
import { stateChecksum } from '@datamoc/mw_games/core';// same state, whatever order the keys happen to be instateChecksum({ hp: 7, x: 2 }) === stateChecksum({ x: 2, hp: 7 }); // truestateChecksum({ hp: 7 }) === stateChecksum({ hp: 6 }); // false
A 32-bit FNV-1a checksum of a state value, stable across machines and across property order.