|
|
|
|
|
by fatty0011
4442 days ago
|
|
Each client writes to a "suggestions" node in the Firebase with their suggestion. Each client also listens for changes to that "suggestions" node to show you how many people have voted on a particular square. Firebase internally does all the work to send the changes on the "suggestions" node to every client. I also have a single host computer (not a server, just my laptop next to me), which goes through all the suggestions once the timer runs out and makes a move for the current team. This move is written to the Firebase and every client is notified by Firebase that the move has been made. They each update their own UI and the process starts over. |
|