This mini game is implemented based on Bluetooth communication (a bit redundant), with a C/S structure, but not AI. The process is to enable the server first, and then start the game after the client connection is successful. It is also worth mentioning that each time the client starts a sub-account, it is also a new start! Due to the time spent watching movies and going out to play in the past few daysProgramThe details are not very considerate. I hope you will forgive me later ~
The following figure shows the running game interface in the simulator:
A brief description of the project's directory structure and functions:
---- Bluetooth // package that encapsulates the Bluetooth function
--- Blueclientservice. Java // encapsulates the class of the client's Bluetooth service to implement the runnable and discoverylistener interfaces.
--- Blueserverservice. Java // encapsulates the Bluetooth service class on the server to implement the runnable interface.
--- Btconnection. Java // responsible for Bluetooth connection operations
---- Components // component class, including some interface classes
--- Gamezone. Java // game Main Interface
--- Indexform. Java // first interface, select a type, such as client or server
---- Logic // package the game logic
--- Gamelogic. Java // game logic class
--- Controller. Java // responsible for interaction between game logic and Bluetooth Communication
---- MIDlet // MAIN package
--- Fivechessgame. Java // program entry class
Although the program is smallCodeThere are a lot of data, and I will not post it here. Source program:/files/royenhome/fivechessgame.rar