in reply to Using threads::shared with multidimensional arrays
Would you consider a different approach? Use a stricter separation of model, view, and controller where each socket thread only gets and sends view information and uses message passing to update the view. That is, instead of updating a shared data structure, send a message (perhaps just by pushing onto a simple queue) to the model describing the move in terms of what the player has requested.
I've used this before to allow very different input forms... it's pretty flexible and keeps things clean.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Many thanks
by Anonymous Monk on Jun 12, 2006 at 12:23 UTC |