Skip to content

Commit f7c4dbd

Browse files
committed
dart format .
1 parent c9f91eb commit f7c4dbd

3 files changed

Lines changed: 17 additions & 12 deletions

File tree

lib/src/board.dart

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,12 @@ class Board {
6363
///
6464
/// e.g. `-------------------*-------**O----**O*-----O--------------------W`.
6565
String stringApplicableToSetboard(final int currentColor) {
66-
final pStone =
67-
currentColor == TurnColor.black ? ColorChar.black : ColorChar.white;
68-
final oStone =
69-
currentColor == TurnColor.black ? ColorChar.white : ColorChar.black;
66+
final pStone = currentColor == TurnColor.black
67+
? ColorChar.black
68+
: ColorChar.white;
69+
final oStone = currentColor == TurnColor.black
70+
? ColorChar.white
71+
: ColorChar.black;
7072

7173
final buffer = StringBuffer();
7274
for (var k = 0; k < 8; k++) {
@@ -101,10 +103,12 @@ class Board {
101103
/// A B C D E F G H
102104
/// ```
103105
String prettyString(final int currentColor) {
104-
final pStone =
105-
currentColor == TurnColor.black ? ColorChar.black : ColorChar.white;
106-
final oStone =
107-
currentColor == TurnColor.black ? ColorChar.white : ColorChar.black;
106+
final pStone = currentColor == TurnColor.black
107+
? ColorChar.black
108+
: ColorChar.white;
109+
final oStone = currentColor == TurnColor.black
110+
? ColorChar.white
111+
: ColorChar.black;
108112

109113
final buffer = StringBuffer()..writeln(' A B C D E F G H');
110114
for (var k = 0; k < 8; k++) {

lib/src/ffi/dylib_utils.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ String get _libName {
99
}
1010

1111
DynamicLibrary dlopenPlatformSpecific([final String dllPath = '']) {
12-
final path =
13-
dllPath.isEmpty ? '${Directory.current.path}/$_libName' : dllPath;
12+
final path = dllPath.isEmpty
13+
? '${Directory.current.path}/$_libName'
14+
: dllPath;
1415
return DynamicLibrary.open(path);
1516
}

lib/src/position.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ class Position {
9797
/// best score links
9898
List<Link> get bestScoreLinks {
9999
if (links.isEmpty) return [];
100-
final linksSortedByScore =
101-
links..sort((final a, final b) => b.score.compareTo(a.score));
100+
final linksSortedByScore = links
101+
..sort((final a, final b) => b.score.compareTo(a.score));
102102
final bestScore = linksSortedByScore.first.score;
103103
return linksSortedByScore
104104
.where((final element) => element.score == bestScore)

0 commit comments

Comments
 (0)