CheeseLord / warts

WAcky Real Time Strategy
MIT License
1 stars 0 forks source link

Factor out `dump` logic and always use GameState #60

Open kronmillerg opened 7 years ago

kronmillerg commented 7 years ago

Currently the client and server separately implement logic to dump the list of all units they know about. The logic is very similar, except it reads from slightly different sources (the server has a GameState object, while the client just keeps track of a list of unit positions). Once the client and server both have copies of the GameState (coming soon!), we should factor out the dumping logic into some common code and have it always work off of a GameState.

kronmillerg commented 7 years ago

The client also indicates which ones are selected, which the server doesn't. So I guess we take an optional unitset and if specified, we star the ones in it. Or some such.