Skip to content

Commit 9d5126e

Browse files
committed
Add README to Rustdoc
1 parent a433ddf commit 9d5126e

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,35 @@ left on the board, ideally in the center location.
1212

1313
![Solitaire board](https://upload.wikimedia.org/wikipedia/commons/thumb/5/50/Spielzug_von_Solit%C3%A4r.gif/330px-Spielzug_von_Solit%C3%A4r.gif)
1414

15-
- [Solutions](solutions/index.md)
15+
- [Solutions](https://github.com/Dampfwalze/solitaire_solver/blob/master/solutions/index.md)
1616
- [Documentation](https://dampfwalze.github.io/solitaire_solver)
1717

1818
This project implements two board representations and two solving schemes,
1919
namely breadth-first and depth-first search.
2020

2121
## Board representations
2222

23-
### [`list_board::Board`](src/board/list_board.rs)
23+
### [`list_board::Board`]
2424

2525
The board is represented with an array of 33 booleans, where each boolean
2626
represents a location on the board. The array is densly packed, so every element
2727
of the array represents a location on the board.
2828

29-
```rust
29+
```rust,no_run
3030
struct Board([bool; 33]);
3131
```
3232

33-
### [`bit_board::Board`](src/board/bit_board.rs)
33+
### [`bit_board::Board`]
3434

3535
The board is represented with one `u64`, where its bytes represent the rows of
3636
an 8x8 bit matrix. Only 7x7 locations are actually used up by the board, like
3737
so:
3838

39-
```rust
39+
```rust,no_run
4040
struct Board(u64);
4141
```
4242

43-
```
43+
```text
4444
0 1 2 3 4 5 6 7 bits
4545
0 . . ● ● ● . . .
4646
1 . . ● ● ● . . .
@@ -52,3 +52,6 @@ struct Board(u64);
5252
7 . . . . . . . .
5353
bytes
5454
```
55+
56+
[`list_board::Board`]: https://dampfwalze.github.io/solitaire_solver/solitaire_solver/board/list_board/struct.Board.html
57+
[`bit_board::Board`]: https://dampfwalze.github.io/solitaire_solver/solitaire_solver/board/bit_board/struct.Board.html

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md"))]
12
#![allow(dead_code)]
23

34
use std::{fs, io::Write};

0 commit comments

Comments
 (0)