Moving Forward
You’ve seen two different Reversi solutions. The first focused on creating a set of generic class interfaces for implementing a two-player game but made the assumption that one player was controlled by the computer. In this chapter, the second solution allowed for both human and computer opponents, and it supported network play.Moving forward, you could refactor these two solutions into one, all-things-to-all-programmers, two-player game engine. It could use interfaces to describe necessary functionality and include generic player classes that support mouse functionality and network communication. In the course of developing such a solution, if you find that your classes are getting too dependent on one another, look into decoupling them using event handlers. The final product would be nothing short of a two-player game-developing “toolkit.”