joelwross / coloradocollegegame

Automatically exported from code.google.com/p/coloradocollegegame
0 stars 0 forks source link

Divorce user/client from client/server communication #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As far as I can tell, currently the code that handles user<-->computer
interaction (like drawing output and listening for keyboard input) is in
the same file (ClientIO.java) as the code that handles client<-->server
interaction (passing information over the net).

These should be split into different classes.

There should be a single class that handles keeping the client-side world
and keeping that sync'd with the server-side world. Then any instance of a
"client program" would reference/include/extend this class. A "client
program" would deal with the user--taking input and giving output. So when
the user hits a key, the "client program" class passes a message to the
client-serverIO, which then communicates with the server.

The main advantage to this is that different people (other than us) could
write a "client" program (kind of like how there 2^x clients for vsn) which
either extends or include our code without actually haven't to look at our
code, and everything will still work the exact same way. Similarly, we
could change our code (how the implementation works) without affecting any
other clients that use it. It makes it easier to distribute and later
change if we have to.

Original issue reported on code.google.com by joelwr...@gmail.com on 1 Feb 2007 at 6:48

GoogleCodeExporter commented 9 years ago

Original comment by joelwr...@gmail.com on 5 Feb 2007 at 3:26

GoogleCodeExporter commented 9 years ago

Original comment by joelwr...@gmail.com on 6 Feb 2007 at 9:21

GoogleCodeExporter commented 9 years ago

Original comment by joelwr...@gmail.com on 6 Feb 2007 at 9:32

GoogleCodeExporter commented 9 years ago

Original comment by joelwr...@gmail.com on 6 Feb 2007 at 9:43

GoogleCodeExporter commented 9 years ago

Original comment by Omer.Ba...@gmail.com on 27 Feb 2007 at 11:42