https://github.com/sharp0802/m5n
A simple swap2-based gomoku server/broker
https://github.com/sharp0802/m5n
Last synced: about 1 month ago
JSON representation
A simple swap2-based gomoku server/broker
- Host: GitHub
- URL: https://github.com/sharp0802/m5n
- Owner: Sharp0802
- License: gpl-3.0
- Created: 2024-02-08T17:02:48.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-16T22:28:52.000Z (over 2 years ago)
- Last Synced: 2025-01-25T22:33:57.403Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 130 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# M5N
A simple swap2-based gomoku server/broker, written in C#, compatible with CPython 3.11
## Requirement
### Compiling
- .NET SDK 8.0 or above
- GCC (MinGW on Windows)
- CPython 3.11
### Runtime
- CPython 3.11 (Only with python backend.)
## Ruleset
Each player can do:
- dye : Choose colour
- put : Put stone
Let player A, B.
1. A put 3-times.
2. B choose:
1. B dye.
2. B put 2-times. A dye.
3. Continue with gomoku-ruleset.
## Disclaimer
- **Virtual-environment or such things are not supported.**
- `set_colour`, `set_stone`, `choose_colour`, `place_stone`, `make_decision`, `victory`, `defeat` is reserved function/handler.
- Do not rename these functions.
- Do not change function signature. Or may cause the client to crash.
- **Only tested on pure python (without any packages)**
## How to write client
See working [sample code](test/python/main.py) with python.
You can prove application manually with sample-code!
...or you can use C/C++ with same constants:
See [sample code](test/c/impl.cpp) with C++.
## How to run client
Let your (python) source codes are in `./app` folder.
Then, you can run client by:
```sh
M5N.Slave Python ./app
```
M5N also supports native-backend built into dll/so.
To use native-backend, Use below command:
```sh
M5N.Slave C path/to/your/binary.dll
```
These syntax is mnemonic with a below rule:
```sh
M5N.Slave [+]
```
## How to run server
```sh
M5N.Master
```
Server will be listening on specified port number.