#ai #battle #cargo #structures #training #client #centerländ

uulm-sopra23-group03-core

Core library for implementing Battle of the Centerländ

10 releases (4 breaking)

0.5.0 Jul 12, 2023
0.4.0 Jul 4, 2023
0.3.3 Jul 3, 2023
0.3.1 Jun 26, 2023
0.1.3 Jun 17, 2023

#8 in #battle

Download history 34/week @ 2024-03-31 157/week @ 2024-04-14

116 downloads per month

AGPL-3.0-or-later

255KB
6K SLoC

core

Core library for implementing Battle of the Centerländ.

Installation

To be able to use this crate, add it to your Cargo.toml:

[dependencies]
botc-core = { package = "uulm-sopra23-group03-core", version = "0.4" }

While the package is named uulm-sopra23-group03-core this adds it to your project as botc-core.

Features

There are features not enabled by default for specific use cases.

[dependencies]
botc-core = { package = "uulm-sopra23-group03-core", version = "0.4", features = ["client"] }

To enable a feature, specify it with the dependency in your Cargo.toml:

Feature Description
client Enables sink/stream based client functionality with the client module. Can be used for implementing a client for the game.
ai Enables the ai with training data structures.

Build

Prerequisites

Everything can be installed with rustup:

# Update rustup's information.
rustup update

# Install the stable Rust toolchain (if not already present).
rustup toolchain add stable

# Add rustfmt.
rustup component add rustfmt

# Add clippy.
rustup component add clippy

Testing

Code Formatting

This should not output anything when the code is formatted corretcly:

cargo fmt --check

Run the following to automatically format the Rust code:

cargo fmt

Code Analysis

Run the following to check the code for common mistakes:

cargo clippy --all-features

Tests

Run tests with the following:

cargo test --all-features

Documentation

Documentation for the local version of the crate can be built and opened with the following:

cargo doc --all-features --open

Dependencies

~3–16MB
~199K SLoC