Multithreading

The JCiv program MUST provide a multithreaded server for the networked game. That is, the network server MUST dedicate (at least) one thread to each player client program. The threads must cooperate to update the centralized game state maintained on the server. The threads MUST be correctly synchronized so that no game state is corrupted. The design of the multithreaded component MUST be described in design and final performance documentation. The server MUST NOT spawn more threads than are necessary, it MUST clean up threads that have terminated (e.g., because a client has left the game), etc. In particular, there must never be more than $ O(n)$ threads running for a game with $ n$ clients (including both clients and server).



Terran Lane 2005-11-10