Interested in the intersections between policy, law and technology. Programmer, lawyer, civil servant, orthodox Marxist. Blind.


Interesado en la intersección entre la política, el derecho y la tecnología. Programador, abogado, funcionario, marxista ortodoxo. Ciego.

  • 1 Post
  • 3 Comments
Joined 1 year ago
cake
Cake day: June 5th, 2023

help-circle

  • Not sure I understand. What I’m trying to do is something like this:

    • Poll a stream which takes fedi events. Read player commands.
    • If an event comes from a known player, check which match they are into.
    • With that info, get their opponents/coplayers etc and perform the change of state in the game (send replies, next turn, etc).

    So what I have as a key is a player name (AP username) and from that I need to find which match they’re in.

    There’s nothing semantically useful about a match ID.


  • Thanks, the RC is a possible approach. It seems to violate DRY a bit but maybe there’s no way around it.

    The reason I had the players outside the match is that I need them there anyway, because when I get a player action I need to check in which match they are, who are their opponent(s) and so on. So even if they’re in, they’ll have to be out too as there are concurrent matches and the player actions come all through the same network stream.