YetAnotherSpieskowcy / Carcassonne-Engine

Other
0 stars 1 forks source link

Carcassonne-Engine

A rule engine for the Carcassonne game.

Pre-requirements

Linux

  1. 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.

  2. Install gcc toolchain from your distro's package repositories (for example, build-essential package on Ubuntu).
  3. Install Python 3.12 (default version on Ubuntu 24.04, find how to install on your distribution otherwise)
  4. Install Docker Engine.

Windows

[!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:

Manually installing pre-requirements

  1. Install Go for Windows x86-64
  2. Install MinGW-w64

    You will have to add following path to PATH in your User Environment Variables after installation:

    %USERPROFILE%\mingw64\bin
  3. Install Python 3.12.
  4. Install Docker Desktop (or Engine)

[!NOTE] This will require enabling optional Windows features (such as Hyper-V) and may require a reboot.

Installing pre-requirements with Chocolatey

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.

Building sources

You can either use the default make target:

This will build all Go source files.

Running the test suite

You can either use the test make target:

To show coverage, you can either use the open-coverage make target:

Linting

You can either use the lint make target: