Skip to content

Commit f339da7

Browse files
enhance documentation for edaxPlayPrint (#166)
* enhance documentation for edaxPlayPrint * bump version * fix comment syntax * fix dart doc command * fix txt comment * add dart ci step * fix step
1 parent 44b6062 commit f339da7

9 files changed

Lines changed: 38 additions & 16 deletions

File tree

.github/workflows/api_doc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@v3
1919
- uses: dart-lang/setup-dart@v1
2020
- name: generate dart docs
21-
run: dartdoc --output docs/
21+
run: dart doc --output docs/
2222
- name: upload to GitHub Pages
2323
uses: peaceiris/actions-gh-pages@v3
2424
with:

.github/workflows/dart_ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ jobs:
111111
cd example && dart pub get && cd ..
112112
dart example/example.dart
113113
114+
- name: generate dart docs
115+
run: dart doc .
116+
114117
dart_publish_dry_run:
115118
needs: dart_test
116119
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
# 3.1.1
2+
3+
- enhance documentation of `edaxPlayPrint`.
4+
15
# 3.1.0
26

3-
- add `edaxPlayPrint`
7+
- add `edaxPlayPrint`.
48

59
# 3.0.0
610

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ dart run pana
7878
#### document
7979

8080
```sh
81-
dartdoc && open doc/api/index.html
81+
dart doc . && open doc/api/index.html
8282
```
8383

8484
#### change libedax bin

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ packages:
7777
path: ".."
7878
relative: true
7979
source: path
80-
version: "3.1.0"
80+
version: "3.1.1"
8181
meta:
8282
dependency: transitive
8383
description:

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: libedax4dart_example
3-
version: 3.1.0-example
3+
version: 3.1.1-example
44
publish_to: none
55

66
environment:

lib/src/board.dart

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,18 @@ class Board {
8787
/// get human readable board.
8888
///
8989
/// example
90-
///
91-
/// A B C D E F G H <br>
92-
/// 1 - - - - - - - - 1 <br>
93-
/// 2 - - - - - - - - 2 <br>
94-
/// 3 - - - - * - - - 3 <br>
95-
/// 4 - - - * * * - - 4 <br>
96-
/// 5 - - * * * * * - 5 <br>
97-
/// 6 - - - * * * - - 6 <br>
98-
/// 7 - - - - * - - - 7 <br>
99-
/// 8 - - - - - - - - 8 <br>
90+
/// ```txt
91+
/// A B C D E F G H
92+
/// 1 - - - - - - - - 1
93+
/// 2 - - - - - - - - 2
94+
/// 3 - - - - * - - - 3
95+
/// 4 - - - * * * - - 4
96+
/// 5 - - * * * * * - 5
97+
/// 6 - - - * * * - - 6
98+
/// 7 - - - - * - - - 7
99+
/// 8 - - - - - - - - 8
100100
/// A B C D E F G H
101+
/// ```
101102
String prettyString(final int currentColor) {
102103
final pStone =
103104
currentColor == TurnColor.black ? ColorChar.black : ColorChar.white;

lib/src/libedax.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,5 +395,19 @@ class LibEdax {
395395
void edaxBookStopCountBestpath() => _bindings.edax_book_stop_count_bestpath();
396396

397397
/// Print play.
398+
///
399+
/// example: after play f5d6c5f4d3, play_print prints
400+
/// ```txt
401+
/// A B C D E F G H BLACK A B C D E F G H
402+
/// 1 - - - - - - - - 1 0:00.012 1 | | | | | | | | | 1
403+
/// 2 - - - . - - - - 2 6 discs 6 moves 2 | | | | | | | | | 2
404+
/// 3 - - . * . - - - 3 3 | | | | 5| | | | | 3
405+
/// 4 - . . * * O - - 4 ply 6 (55 empties) 4 | | | |()|##| 4| | | 4
406+
/// 5 - . * * O * . - 5 White's turn (O) 5 | | | 3|##|()| 1| | | 5
407+
/// 6 - - - O - . - - 6 6 | | | | 2| | | | | 6
408+
/// 7 - - - - - - - - 7 3 discs 8 moves 7 | | | | | | | | | 7
409+
/// 8 - - - - - - - - 8 0:00.000 8 | | | | | | | | | 8
410+
/// A B C D E F G H WHITE A B C D E F G H
411+
/// ```
398412
void edaxPlayPrint() => _bindings.edax_play_print();
399413
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See: https://dart.dev/tools/pub/publishing
33

44
name: libedax4dart
5-
version: 3.1.0
5+
version: 3.1.1
66
description: Dart wrapper for libedax. With using libedax4dart, you can execute functions equivalent to edax.
77
homepage: https://github.com/sensuikan1973/libedax4dart
88
documentation: https://sensuikan1973.github.io/libedax4dart

0 commit comments

Comments
 (0)