Go to file
Calcitem 40e6f0a026 ci: Merge some GitHub Action yml files
* Merge dart-analyze.yml to flutter.yml.
* When the dart analyze hook fails don't try to build the apk.
* Merge cui-on-xxx.yml to cui.yml and remove "Archive apk" comments.
2021-11-29 23:05:55 +08:00
.github ci: Merge some GitHub Action yml files 2021-11-29 23:05:55 +08:00
.run add compile time enviornment options 2021-10-22 14:47:17 +02:00
.vscode cpp: gtest: Add types and stack test 2021-11-23 01:17:53 +08:00
ci ci: qt: Add qt-on-windows.yml 2021-11-21 03:16:54 +08:00
fastlane/metadata/android Sanmill v1.1.38 (2196) 2021-10-05 00:33:27 +08:00
include cpp: style: Limit column limit to 80 2021-11-20 01:29:57 +08:00
resources Fix spelling errors 2021-10-31 12:57:03 +08:00
src remove old rule class 2021-11-28 22:00:01 +01:00
tests better utilize arb localization features 2021-11-23 18:41:17 +01:00
.editorconfig style: add .editorconfig 2021-11-07 16:01:33 +01:00
.gitattributes .gitattributes: Do not always perform LF normalization on .txt and .json files 2021-11-04 07:22:28 +08:00
.gitignore cpp: Add Code::Blocks cbp file for console project 2021-11-28 01:27:29 +08:00
.vera-profile cpp: Fix Vera++ issues 2021-11-21 02:00:24 +08:00
AUTHORS authors: Add Nikolas Rimikis to the authors list 2021-10-11 02:16:04 +08:00
CODEOWNERS Create CODEOWNERS (#369) 2021-11-06 01:41:04 +08:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2021-10-31 20:57:56 +08:00
CPPLINT.cfg cpp: style: Limit column limit to 80 2021-11-20 01:29:57 +08:00
Copying.txt license: Change Licence to GPL 3.0 2019-11-03 13:00:45 +08:00
MillGame.ico icon: Replace icons 2021-02-14 16:49:37 +08:00
Readme.md Fix some typos in Readme.md 2021-10-30 13:41:48 +08:00
Sanmill.cbp cpp: Add Code::Blocks cbp file for console project 2021-11-28 01:27:29 +08:00
Sanmill.dev cpp: Add Dev-C++ project file 2021-11-21 02:00:24 +08:00
appveyor.yml msvc: Upgrade to Qt 5.15.2 2021-10-23 11:29:28 +08:00
clean.sh sh: Adapt multi-platforms 2021-07-11 19:55:46 +08:00
cov.sh Add cov.sh 2021-08-14 14:04:59 +08:00
deploy.sh deploy.sh: Do not commit and only push 2020-12-21 23:51:46 +08:00
eol.sh Add eol.sh to change some file's EOL from DOS to Unix 2021-11-21 02:40:06 +08:00
flutter-init.sh remove enviorment configs 2021-11-25 15:32:33 +01:00
flutter-windows-init.sh windows: Enable windows desktop in flutter-windows-init.sh 2021-10-23 14:16:00 +08:00
gamewindow.qrc Fix spelling errors 2021-10-31 12:57:03 +08:00
gamewindow.ui qt: refactor: Rename manual list to move list 2021-11-29 01:26:19 +08:00
millgame-qt_zh_CN.ts rule: Add 60 option to N-move rule 2021-10-04 17:57:22 +08:00
millgame.pro qt: refactor: Rename manual list to move list 2021-11-29 01:26:19 +08:00
millgame.rc Sanmill v1.1.38 (2196) 2021-10-05 00:33:27 +08:00
millgame.sln msvc: Upgrade to Visual C++ 2022 2021-11-21 02:00:24 +08:00
millgame.vcxproj qt: refactor: Rename manual list to move list 2021-11-29 01:26:19 +08:00
millgame.vcxproj.filters qt: refactor: Rename manual list to move list 2021-11-29 01:26:19 +08:00
programr.md Fix spelling errors 2021-10-31 12:57:03 +08:00
rcc.sh chmod +x *.sh 2021-05-29 04:17:02 +08:00
release.sh Add fa-IR resources to fastlane and android res 2021-08-08 01:31:43 +08:00
version.sh macos: Fix version.sh and release.sh 2021-07-11 23:59:39 +08:00

Readme.md

Overview

YouTube

Get it on GitHub Get it on F-Droid Get it on Google Play Get it on CafeBazaar

Build Status Codacy Badge

Sanmill is a free, powerful UCI-like N men's morris program with CUI, Flutter GUI and Qt GUI.

Nine men's morris is a strategy board game for two players dating at least to the Roman Empire. The game is also known as nine-man morris, mill, mills, the mill game, merels, merrills, merelles, marelles, morelles, and ninepenny marl in English.

image

Files

This distribution of Sanmill consists of the following files:

  • Readme.md, the file you are currently reading.

  • Copying.txt, a text file containing the GNU General Public License version 3.

  • src, a subdirectory containing the full source code, including a Makefile that can be used to compile Sanmill CUI on Unix-like systems.

  • src/ui/flutter_app, a subdirectory containing a Flutter frontend.

  • src/ui/qt, a subdirectory containing a Qt frontend.

How to Build

CUI

Sanmill CUI has support for 32 or 64-bit CPUs, certain hardware instructions, big-endian machines such as Power PC, and other platforms.

It should be easy to compile Sanmill directly from the source code on Unix-like systems with the included Makefile in the folder src. Generally, it is recommended to run make help to see a list of make targets with corresponding descriptions.

cd src
make help
make build ARCH=x86-64-modern

When reporting an issue or a bug, please tell us which version and compiler you used to create your executable. This information can be found by typing the following commands in a console:

./sanmill compiler

Qt Application

If you have started using Ubuntu or any Ubuntu-based Linux distribution, you must install Qt by running the following command as root:

sudo apt-get install qt5-default qtmultimedia5-dev qtcreator

Use Qt Creator to open millgame.pro , or use Visual Studio to open millgame.sln to build Qt Application.

Flutter App

Run ./flutter-init.sh , copy src/ui/flutter_app/android/key.properties.example to src/ui/flutter_app/android/key.properties, modify it, and then use IntelliJ IDEA or Visual Studio Code to open src/ui/flutter_app to build Flutter App.

We use compile-time environment configs to enable specific parts of the code:

  • monkey_test to prepare the app for monkey tests. (References to external sites are going to be disabled.)
  • dev_mode to show the developer mode without needing to enable it first.
  • catcher to control the use of catcher. (This is on by default and needs to be disabled when required.)

All environment configs can be combined and take a value of bool like:

flutter run --dart-define catcher=false dev_mode=true

For ease of use, some launch configs for IntelliJ IDEA or Visual Studio Code are available. Just select the needed one in the Run and Debug or Run/Debug Configurations tab.

Understanding the code base and participating in the project

Sanmill's improvement over the last couple of years has been a great community effort. There are a few ways to help contribute to its growth.

Improving the code

If you want to help improve the code, there are several valuable resources:

  • In this wiki, many techniques used in Sanmill are explained with a lot of background information.

  • The latest source can always be found on GitHub.

  • Discussions about Sanmill take place in the Discussions.

Terms of use

Sanmill is free and distributed under the GNU General Public License version 3 (GPL v3). Essentially, this means you are free to do almost exactly what you want with the program, including distributing it among your friends, making it available for download from your website, selling it (either by itself or as part of some bigger software package), or using it as the starting point for a software project of your own.

The only real limitation is that whenever you distribute Sanmill in some way, you must always include the full source code or a pointer to where the source code can be found. If you make any changes to the source code, these changes must also be made available under the GPL.

For full details, read the copy of the GPL v3 found in the file named Copying.txt.