ReadonlylengthThe length measured when the position was created (N plus Z), the one the threshold and the max
length are compared with. It doesn't count the zeroes that complete the string: "mmmmm!" created by
start has 5, "ab!!!!" forged from "ab" has 2.
The digits of the N section.
The digits of the Z section.
Gets all the digits of the position in a single number: N as the integer part and Z below it.
It is used to compare positions, and system.from creates a position back from it.
Checks if this and other have the same value.
The object to compare with.
true if both have the same value.
Builds the string of the position with the characters of the system that created it. This is the value to store and to sort by.
A position: the place of an item in a list, created by a
Staquiasystem.It has two sections, printed one after the other:
N, with a fixed length (ln): it moves up and down to stack items at the start or the end.Z, with a flexible length (up tolz): it grows when an item is placed between two others.A position only contains data and keeps no reference to its system. Store it as a string (
toString()) and recreate it withsystem.forge(string).Example