A rule engine for the Carcassonne game.
Install Go 1.22 either from your distro's package repositories or by following instructions on Golang's site
Tip: If you're using Ubuntu 23.10 or lower, Go version in official repositories is going to be too old.
You can get the latest version by adding the PPA listed on Go wiki and installing golang
package after.
gcc
toolchain from your distro's package repositories (for example, build-essential
package on Ubuntu).[!NOTE] Windows support is maintained on best-effort basis - we may drop it once it becomes a burden.
We provide you with 2 ways of installing pre-requirements - manual installation or automated installation with Chocolatey:
Install MinGW-w64
You will have to add following path to PATH in your User Environment Variables after installation:
%USERPROFILE%\mingw64\bin
[!NOTE] This will require enabling optional Windows features (such as Hyper-V) and may require a reboot.
These instructions assume that you already have Chocolatey installed. If not, you can install it by following its install documentation.
[!NOTE] The instructions below will enable the Hyper-V feature on your system.
Run PowerShell as Administrator and execute the following command:
choco install Containers Microsoft-Hyper-V --source windowsfeatures
choco install docker-engine golang mingw golangci-lint python312
Reboot the system to enable Hyper-V and start the Docker service.
You can either use the default make target:
make
Set-ExecutionPolicy Bypass -Scope Process -Force
./make.ps1
or run the build command manually:
go build "./..."
This will build all Go source files.
You can either use the test
make target:
make test
Set-ExecutionPolicy Bypass -Scope Process -Force
./make.ps1 test
or run the test command manually:
go test -race "-coverprofile=coverage.txt" "./..."
To show coverage, you can either use the open-coverage
make target:
make open-coverage
Set-ExecutionPolicy Bypass -Scope Process -Force
./make.ps1 open-coverage
or run the cover tool command manually:
go tool cover "-html=coverage.txt"
You can either use the lint
make target:
make lint
Set-ExecutionPolicy Bypass -Scope Process -Force
./make.ps1 lint
or run the lint command manually:
docker run -e "VALIDATE_ALL_CODEBASE=true" -e "DEFAULT_BRANCH=origin/main" -e "VALIDATE_GO=false" -e "LOG_LEVEL=NOTICE" -e "RUN_LOCAL=true" -v ".:/tmp/lint" --rm "ghcr.io/super-linter/super-linter:v6.3.1"