JHex is a standalone Java implementation of the game Hex, like this applet. But this implementation is not an applet, but a normal standalone Java program, with chat and network multiplayer option.


Game Design

Game start:

By clicking on one of the four buttons one of the next screens are displayed.

For one or two player mode on one computer:

A network game can be created and registered on a internet server. In both cases the creator waits after clicking "OK" until someone joins the created game:

A player can connect a waiting server. The "Server" is the address of a other player waiting, or of a server, on wich other players can register their games:

The game:

The framework provides an easy interface for implementing other two player games as well, like Chain Reaction:

Class Design

Class (sorted by packages) Responsibility
Main, ChatPanel, Util class with the main method, a class for the chat area and a utility class with static methods like center for dialogs
CreateNetworkDialog, GameSelectionPanel, GameStartDialog, GameTableModel, JoinNetworkDialog, OkCancelListener, OkCancelPanel, OneComputerDialog, PlayerConfigPanel PlayerPanel all general dialogs and GUI helper classes
Game, GameComponent, GameConfigPanel, GameConfiguration, IntroComponent GUI, model and controller base classes for the games
Explode, ExplodeComponent, ExplodeConfigPanel, ExplodeConfiguration implementation for the game "Chain Reaction (Explode)"
Hex, HexComponent, HexConfigPanel, HexConfiguration implementation for the game "Hex"

Currently single player mode for JHex against the computer is implemented and the GUI of Chain Reaction: JHex download page

The sourceforge project page
SourceForge Logo