history
rules
expert advice
online challenge
game source
links
test yourself
board room
the last minute
about us




source code for programs

For the first time on the Internet, we release source codes of our Java network-capable weiqi game. Though this game may seem complicated, the source code is very short.

The source code is divided into several parts :

  • Board - routines for notifying users of events
  • Chess - logics for the game and routines for drawing the board
  • Client - program to communicate with server
  • Server - program on server to handle commands sent in from client computers
  • Server Thread - handles multiple users
  • User - program on client system
  • Weiqi - general file used for compiling
  • Welcome Dialog - the login prompt


notes

  • We have limited the program to handle up to 100 players.
  • The client system must not be behind a firewall.


    directions to use

  • Compile the Weiqi.java with a Java compiler. Make sure all the files are in the same directory before you compile. We compile the source code using Java Development Kit 1.1.8 in DOS-prompt with the command 'javac Weiqi.java'.

  • Compile the Server.java with a Java compiler. with the command 'javac Server.java'.

  • Put all the files into your server. Then execute the server by running the Server.class file. If you are using JDK, try 'java Server' to start the server.


    view the source file

    By visiting the below links to the source code, you have agreed to our license agreement. The source codes are copyright and if you wish to use the source code or part of the engine of the game, you must obtain weiqi.com permission first. The final decision lies with weiqi.com .

    Source for Board.Java

    Source for Chess.Java

    Source for Client.Java

    Source for Server.Java

    Source for ServerThread.Java

    Source for User.Java

    Source for Weiqi.Java

    Source for WelcomeDialog.Java

    top

  • ©1999. weiqi.com Last updated on 14/08/99