using ulong for state value and short for location value so that games with more than 256 tiles can be played