Current game synchronization is done purely through Supabase Realtime Postgres, this has the issue of introducing latency and creating race conditions in situations where more than one player checks a square at the same time.
https://supabase.com/docs/guides/realtime/extensions/postgres-changes
Supabase Presence API could be a good alternative to sync state between clients. With Postgres still being the final source of truth for the game state. Possibly the server would be responsible to persist state to the database and the clients would only be allowed to write data to the presence channel.
https://supabase.com/docs/guides/realtime/extensions/presence
Current game synchronization is done purely through Supabase Realtime Postgres, this has the issue of introducing latency and creating race conditions in situations where more than one player checks a square at the same time. https://supabase.com/docs/guides/realtime/extensions/postgres-changes
Supabase Presence API could be a good alternative to sync state between clients. With Postgres still being the final source of truth for the game state. Possibly the server would be responsible to persist state to the database and the clients would only be allowed to write data to the presence channel. https://supabase.com/docs/guides/realtime/extensions/presence