Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,4 @@ packages:
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.7.0 <4.0.0"
dart: ">=3.8.0 <4.0.0"
20 changes: 12 additions & 8 deletions lib/src/board.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ class Board {
///
/// e.g. `-------------------*-------**O----**O*-----O--------------------W`.
String stringApplicableToSetboard(final int currentColor) {
final pStone =
currentColor == TurnColor.black ? ColorChar.black : ColorChar.white;
final oStone =
currentColor == TurnColor.black ? ColorChar.white : ColorChar.black;
final pStone = currentColor == TurnColor.black
? ColorChar.black
: ColorChar.white;
final oStone = currentColor == TurnColor.black
? ColorChar.white
: ColorChar.black;

final buffer = StringBuffer();
for (var k = 0; k < 8; k++) {
Expand Down Expand Up @@ -101,10 +103,12 @@ class Board {
/// A B C D E F G H
/// ```
String prettyString(final int currentColor) {
final pStone =
currentColor == TurnColor.black ? ColorChar.black : ColorChar.white;
final oStone =
currentColor == TurnColor.black ? ColorChar.white : ColorChar.black;
final pStone = currentColor == TurnColor.black
? ColorChar.black
: ColorChar.white;
final oStone = currentColor == TurnColor.black
? ColorChar.white
: ColorChar.black;

final buffer = StringBuffer()..writeln(' A B C D E F G H');
for (var k = 0; k < 8; k++) {
Expand Down
8 changes: 4 additions & 4 deletions lib/src/ffi/bindings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1377,11 +1377,11 @@ class LibEdaxBindings {
ffi.Pointer<ffi.NativeFunction<ffi.LongLong Function()>> value) =>
_time_clock.value = value;

late final ffi.Pointer<ffi.Long> _timezone$1 = _lookup<ffi.Long>('timezone');
late final ffi.Pointer<ffi.Long> _timezone = _lookup<ffi.Long>('timezone');

int get timezone$1 => _timezone$1.value;
int get timezone => _timezone.value;

set timezone$1(int value) => _timezone$1.value = value;
set timezone(int value) => _timezone.value = value;

late final ffi.Pointer<ffi.Pointer<ffi.Pointer<ffi.Char>>> _tzname =
_lookup<ffi.Pointer<ffi.Pointer<ffi.Char>>>('tzname');
Expand Down Expand Up @@ -9969,7 +9969,7 @@ final class timeval64 extends ffi.Struct {
external int tv_usec;
}

final class timezone extends ffi.Struct {
final class timezone$1 extends ffi.Struct {
@ffi.Int()
external int tz_minuteswest;

Expand Down
5 changes: 3 additions & 2 deletions lib/src/ffi/dylib_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ String get _libName {
}

DynamicLibrary dlopenPlatformSpecific([final String dllPath = '']) {
final path =
dllPath.isEmpty ? '${Directory.current.path}/$_libName' : dllPath;
final path = dllPath.isEmpty
? '${Directory.current.path}/$_libName'
: dllPath;
return DynamicLibrary.open(path);
}
4 changes: 2 additions & 2 deletions lib/src/position.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ class Position {
/// best score links
List<Link> get bestScoreLinks {
if (links.isEmpty) return [];
final linksSortedByScore =
links..sort((final a, final b) => b.score.compareTo(a.score));
final linksSortedByScore = links
..sort((final a, final b) => b.score.compareTo(a.score));
final bestScore = linksSortedByScore.first.score;
return linksSortedByScore
.where((final element) => element.score == bestScore)
Expand Down
22 changes: 11 additions & 11 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ packages:
dependency: transitive
description:
name: dart_style
sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac"
sha256: "5b236382b47ee411741447c1f1e111459c941ea1b3f2b540dde54c210a3662af"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.1.0"
ffi:
dependency: "direct main"
description:
Expand All @@ -125,10 +125,10 @@ packages:
dependency: "direct dev"
description:
name: ffigen
sha256: "72d732c33557fc0ca9b46379d3deff2dadbdc539696dc0b270189e2989be20ef"
sha256: cb3edbfb68ac5283102a2deb7057913d3a1fb16552dacda0c07eb144497e4891
url: "https://pub.dev"
source: hosted
version: "18.1.0"
version: "19.0.0"
file:
dependency: transitive
description:
Expand Down Expand Up @@ -453,26 +453,26 @@ packages:
dependency: "direct dev"
description:
name: test
sha256: f1665eeffe3b6b193548b5f515e8d1b54ccd9a6e0e7721a417e134e7ed7f06a1
sha256: "0561f3a2cfd33d10232360f16dfcab9351cfb7ad9b23e6cd6e8c7fb0d62c7ac3"
url: "https://pub.dev"
source: hosted
version: "1.26.0"
version: "1.26.1"
test_api:
dependency: transitive
description:
name: test_api
sha256: "6c7653816b1c938e121b69ff63a33c9dc68102b65a5fb0a5c0f9786256ed33e6"
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
url: "https://pub.dev"
source: hosted
version: "0.7.5"
version: "0.7.6"
test_core:
dependency: transitive
description:
name: test_core
sha256: "3caa7c3956b366643b2dedecff764cc32030317b2a15252aed845570df6bcc0f"
sha256: "8619a9a45be044b71fe2cd6b77b54fd60f1c67904c38d48706e2852a2bda1c60"
url: "https://pub.dev"
source: hosted
version: "0.6.9"
version: "0.6.10"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -546,4 +546,4 @@ packages:
source: hosted
version: "2.2.2"
sdks:
dart: ">=3.7.0 <4.0.0"
dart: ">=3.8.0 <4.0.0"
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ homepage: https://github.com/sensuikan1973/libedax4dart
repository: https://github.com/sensuikan1973/libedax4dart

environment:
sdk: '>=3.7.0 <4.0.0' # See: https://dart.dev/null-safety#enable-null-safety
sdk: '>=3.8.0 <4.0.0' # See: https://dart.dev/null-safety#enable-null-safety

dependencies:
ffi: ^2.1.4
Expand All @@ -17,10 +17,10 @@ dependencies:
dev_dependencies:
analyzer: ^7.4.5
coverage: ^1.13.1 # See: https://github.com/dart-lang/test/issues/1265
ffigen: ^18.1.0
ffigen: ^19.0.0
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://pub.dev/packages/ffigen/changelog#1900

Breaking change: Major change to the way ObjC methods are code-genned. Methods now use named parameters, making them more readable and closer to how they're written in ObjC. For example, the NSData method dataWithBytes:length: used to be generated as dataWithBytes_length_(Pointer bytes, int length), but is now generated as dataWithBytes(Pointer bytes, {required int length}). Protocol methods are not affected.
Migration tip: A quick way to find affected methods is to search for _(.

pana: ^0.22.21
pedantic_sensuikan1973: ^5.12.0
test: ^1.26.0
test: ^1.26.1

topics:
- reversi
Expand Down
Loading