Skip to content

Commit

Permalink
Merge branch 'readme-update'
Browse files Browse the repository at this point in the history
  • Loading branch information
mkouhia committed May 29, 2024
2 parents 392a290 + 576eee1 commit 9689590
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.1] - 2024-05-29

### Added
- Trim trailing whitespace from input rows; increase robustness.

## [0.2.0] - 2024-05-29

### Added
Expand Down Expand Up @@ -41,7 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Dragon routing based on shortest path to current hero position.
- Playback solution.

[unreleased]: https://github.com/mkouhia/wundernut-vol13/compare/v0.2.0...HEAD
[unreleased]: https://github.com/mkouhia/wundernut-vol13/compare/v0.2.1...HEAD
[0.2.1]: https://github.com/mkouhia/wundernut-vol13/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/mkouhia/wundernut-vol13/compare/v0.1.2...v0.2.0
[0.1.2]: https://github.com/mkouhia/wundernut-vol13/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/mkouhia/wundernut-vol13/compare/v0.1.0...v0.1.1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wundernut-vol13"
version = "0.2.0"
version = "0.2.1"
authors = ["Mikko Kouhia <[email protected]>"]
edition = "2021"
description = "Solution to Wundernut vol. 13"
Expand Down
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ If necessary, consult the program help in

solve-maze --help

```
Solution to Wundernut vol. 13
Usage: solve-maze [OPTIONS] <FILE>
Arguments:
<FILE> File, where to read the maze. Use `-` for stdin
Options:
-p, --playback Display solution on the terminal
-f, --frame-length <FRAME_LENGTH> Playback frame length in milliseconds [default: 300]
-h, --help Print help
-V, --version Print version
```

### Extras (additional fun factor)
Additional feature `mapgen` will can generate more maps for an increased fun factor. Build with feature `mapgen` to create another binary `generate-maze`:

Expand Down Expand Up @@ -130,6 +145,20 @@ You can build the developer documentation with
cargo doc
### Code quality
Code must be formatted with `rustfmt`:
rustfmt src/*.rs
And quality checked with static analyzer `cargo clippy`:
cargo clippy
An easy way to examine test coverage is to install additional cargo command with `cargo install cargo-llvm-cov` and then run
cargo llvm-cov --open
## License
This project is licensed under the terms of the MIT license.
2 changes: 1 addition & 1 deletion src/bin/generate-maze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use wundernut_vol13::maze_generator::MazeGenerator;
#[command(version, about, long_about = None)]
struct Args {
/// Generated field height
#[arg(long, default_value_t = 20)]
#[arg(long, default_value_t = 19)]
height: usize,

/// Generated field width
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl Maze {

let squares: Vec<Vec<char>> = emojis
.split('\n')
.map(|row| row.chars().collect())
.map(|row| row.trim_end().chars().collect())
.collect();

let mut graph = Graph {
Expand Down

0 comments on commit 9689590

Please sign in to comment.