Runtime detail that goes together with the clip in first post (see still of it attached below):
The dump of the board lane by lane into the console, before player 0 (yellow) wins the 3rd race and wins the game, from the boards perspective (<-- comments added). It shows the neopixel buffer as sent out - 30 bytes - byte by byte (3 bytes per line defining the R G B components for the LEDs). The bytes are sent in reverse order: the last bytes - bytes for the last LED in the string - are sent first, and the first bytes - bytes for the first LED - are sent last. Last 3 bytes - as sent first - are passed thru all but last LED from one LED to the next one. First 3 bytes - as sent last - are never passed on, they stay within first LED.
>dump()
--- player 0 - 3 ( 2 ): <-- race position ( races won ) - *** zig ***
0 - 0 0 0 <-- pos 0 of even lane 0, bytes 0,1,2...
1 - 8 4 0 <-- races-won (2) positional indicator
2 - 0 0 0
3 - 174 81 0 <-- race position (3) indicator
4 - 0 0 0 <-- pos 4 of even lane 0, ...,12,13,14 for top lane 0
--- player 1 - 2 ( 2 ): <-- race position ( races won ) - *** zag ***
0 - 0 0 0 <-- pos 4 of odd lane 1 (bytes 15,16,17...)
1 - 0 0 0
2 - 237 0 15 <-- race position (2) indicator
3 - 11 0 1 <-- races-won (2) positional indicator
4 - 0 0 0 <-- pos 0 of odd lane 1 (...27,28,29 for bottom lane 1)
=undefined
This is the matching players (variable) information (with some additional formatting):
Property negPoints not used (yet). Can be used to collect sub-par information relative to the winners in order to have more granular ranking across the races for a game or even beyond to indicate "better or worse losses / fare from or close to winning"...
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Runtime detail that goes together with the clip in first post (see still of it attached below):
The dump of the board lane by lane into the console, before player 0 (yellow) wins the 3rd race and wins the game, from the boards perspective (<-- comments added). It shows the neopixel buffer as sent out - 30 bytes - byte by byte (3 bytes per line defining the R G B components for the LEDs). The bytes are sent in reverse order: the last bytes - bytes for the last LED in the string - are sent first, and the first bytes - bytes for the first LED - are sent last. Last 3 bytes - as sent first - are passed thru all but last LED from one LED to the next one. First 3 bytes - as sent last - are never passed on, they stay within first LED.
This is the matching
players
(variable) information (with some additional formatting):Property
negPoints
not used (yet). Can be used to collect sub-par information relative to the winners in order to have more granular ranking across the races for a game or even beyond to indicate "better or worse losses / fare from or close to winning"...1 Attachment