questions

Forum > Questions > Tied rolls for Jane
Reply To Thread (login)
LOMU [300]
2025-05-01 00:44:57 🔗
[15 days ago]

A random question that came up a while ago...

What happens when more than one roll for an item from Jane tie for the highest number? Granted it is super unlikely to occur, but it happened twice within a week at some point last year and we couldn't figure out the logic :P


 
Zach01 [382]
2025-05-01 07:47:33 🔗
[15 days ago]

Yeah it happened twice between me and you I think and we never found out lol, I'm also interested.


 
Esvrainzas [359]
2025-05-01 08:11:12 🔗
[15 days ago]

For me it would make sense that the first person to roll should win.


 
Zach01 [382]
2025-05-01 08:20:06 🔗
[15 days ago]

Yeah you would think so but pretty sure that wasn't the case, I would guess there is maybe a secondary invisible roll or something.


 
Ender [1]
Administrator
2025-05-01 09:08:48 🔗
[15 days ago]

How to nerd-snipe Ender: Ask about game minutiae. :D

Short answer: It's effectively random (but probably consistently random for the same pair of IRC hosts (not nicknames)).

Longer answer with technical details: Rolls are collected into a Java HashMap. The key is a User object which implements hashCode() (and equals()) using the IRC host. This is to prevent duplicate rolls from the same person using a different nick. HashMap then uses hashCode() to build its internal array. When iterating over the HashMap, if there's a tie, the game code takes the first roll. Which roll will be the first roll will depend on iteration order, which is technically undefined. In practice though, given the same set of map keys in the same order, the iteration order will probably be consistent/repeatable across runs.


 
LOMU [300]
2025-05-01 21:47:30 🔗
[14 days ago]

Thanks Ender! :D


 
Forum > Questions > Tied rolls for Jane
Reply To Thread (login)