I’ve seen many implementations of this Algorithm or “Game” in almost any language or platform out there. I have not seen yet, someone implementing this on Salesforce LWC. I’m pretty sure someone might have tried that before me, But I thought to myself.. “Self..maybe you should write one and see what you can learn from this…”
When dealing with many records or in fact any list of records, its always a good practice to add some elements of pagination and limit the volume of records displayed. This will optimise the performance and will reduce a chance of hitting limits when record volumes are high.