Sunday, July 21, 2013

NetBLAM - The Integrator

I think I've figured out how I'm going to handle situations that require a player to do something out of turn (like dodging a bullet or drinking a beer before death).  I'm going to call a method of the Game class that causes the server to pause the normal turn and get ready for the other player(s) to play a card.  Logic.Game won't have to do anything there -- it's abstract -- but Integrator.ServerGame will actually tell the players what is happening.

Speaking of the Integrator layer, I started setting up some classes for the server.  I created PlayerCon (a representation of a player's connection that contains network instances and player info) and Server (a factory for actual asynchronous server listening threads).  Since the server will run on a separate thread, I can just run a loop forever.  Once I have network code, I can start writing and debugging some basic game logic.

No comments:

Post a Comment