This is a program that simulate the behaviour of The Accountant game from Codingame website.
The project is instrumented with Cargo. To build it, you need Cargo and Rust installed. Then you can launch the following command.
cargo build
To run the program, launch the following command.
cargo run
Note that it will a specific configuration. You may change it in
src/main.rs
near the beginning of the main
function.
Once launched, the game is expecting you to type one of the 2 following commands:
SHOOT <enemy_id>
MOVE <x> <y>
This project has implemented all of the logic of the game as a library (see src/lib.rs).
Most of the code has been tested. You may run the test with the following command.
cargo test
Benchmarks are also available through the following command.
cargo bench
By default, the code is automatically linted through the
clippy
plugin when you build the
project. However, you may want to run the linting by yourself. Install the
Cargo plugin for clippy
with the
following command.
cargo install clippy
Then you should be able to run the following command to lint the code.
cargo clippy