beep-beep-beep-boop / clicktogether

a clicktogether server will click a specified keyboard key once all clients have clicked theirs.
0 stars 0 forks source link

users can submit multiple clicks #1

Closed beep-beep-beep-boop closed 1 year ago

beep-beep-beep-boop commented 1 year ago

right now, the server just counts how many clicks anyone submits and simulates a keypress once those reach the number of connected users. so e.g. if there were 2 connected users, and one of them clicked twice, the server would simulate a keypress even though the other user hadn't clicked.

we can fix this by using a HashSet instead of a number to store current clicks from users.