Code Monkey home page Code Monkey logo

mill2's Introduction

Mill in Rust

This is a mill implementation in Rust for the "Programmierprojekt: Mühlespiel in Rust" course in the University of Stuttgart in the summer semester of 2023.

The course is held by the FMI FMI and is initially taking place this semester.

Due to git LFS destroying the last repo, we had to make a new one... The old repo with its lastest branch is archived here.

Open TODOs

Besides the TODOs in the programs text, the following parts/ rules of the game are atm not fully implemented yet:

Rules:

  • If a player can't move stones any more, he has lost the party
  • If a player only has stones in a closed mill, a stone can be beaten out of one closed mill

Assignments

Assignment 3

Just cargo run it :^)

Assignment 4

Execution:

cd mill2
cargo test -- assignment4
diff output.txt ../blatt_4_test_data_large/output.txt

Example for input_felder.txt © FMI Uni Stuttgart:

BBEEEEEBEEEEWEWWBWWEEEBE
BBEEEWEBBEWEBEEEEEEEEEEE
BEEEWWBEWEWEEEEWEEEEEBBB
BWEWEEWEBEBBEBWEWEEBEWWB
EBBBEEEWEEBEWEBEEEEEEEEE
EBEEWBWWEBBEBEWBEWEWBEWE
EEBEBWWEWEWWEEEEEEEBBBEE

Assignment 5

cd mill2
cargo test -- assignment5 --nocapture

Or do a cargo bench & take a look into the perf-opti branch to see my waste of time due two stupid bugs... :'(

Assignment 6

Moved to library

cd mill2
# release is necessary, else it might take forever...

# Tests for plain run without any output:
cargo test --release --lib -- game::efficient_state::win_decider::unit_tests::t5vs5_run_won_loose_set_generation --exact
cargo test --release --lib -- game::efficient_state::win_decider::unit_tests::t9vs9_run_won_loose_set_generation --exact

# Tests agains reference files in the same directory:
# `input_felder_5vs5_large.txt` & `output_5vs5_large.txt`, `input_felder_5vs5.txt` & `output_3vs3.txt` and `input_felder_3vs3.txt` & `output_3vs3.txt`
cargo test --release --lib -- game::efficient_state::win_decider::unit_tests::t3vs3_all_won_loose_set_correct --exact --nocapture
cargo test --release --lib -- game::efficient_state::win_decider::unit_tests::t5vs5_all_won_loose_set_correct --exact --nocapture
cargo test --release --lib -- game::efficient_state::win_decider::unit_tests::t5vs5_all_won_loose_set_correct_large --exact --nocapture

mill2's People

Contributors

becknik avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.