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.
In reply to Re: Using threads::shared with multidimensional arrays
by chromatic
in thread Using threads::shared with multidimensional arrays
by fridayjones85
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |