Skip to content

Commit

Permalink
feat: 🎸 create console bin
Browse files Browse the repository at this point in the history
  • Loading branch information
panicdragon committed Jul 29, 2023
1 parent 4a4a7ef commit 48386d3
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bin/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import 'package:dart_console/dart_console.dart';
import 'package:push_puzzle/src/push_game.dart';

void main(List<String> arguments) async {
final console = Console();
// final game = PushGame();
// game.draw();
console.write('Press the key. To exit, press "q". \n');

while (true) {
final key = console.readKey();
if (key.controlChar == ControlCharacter.none) {
console.write('push key: ${key.char}。\n');
// game.update(input key);
}
if (key.char == 'q') {
break;
}
}
}
32 changes: 32 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.5"
dart_console:
dependency: "direct main"
description:
name: dart_console
sha256: cfbaeb901f23f3c838a6e70bf15c747b83bf53884bb850d1536c8512dc5005b3
url: "https://pub.dev"
source: hosted
version: "1.1.2"
fake_async:
dependency: transitive
description:
Expand All @@ -57,6 +65,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99
url: "https://pub.dev"
source: hosted
version: "2.0.2"
flame:
dependency: "direct main"
description:
Expand All @@ -83,6 +99,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
intl:
dependency: transitive
description:
name: intl
sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
url: "https://pub.dev"
source: hosted
version: "0.17.0"
js:
dependency: transitive
description:
Expand Down Expand Up @@ -200,6 +224,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
win32:
dependency: transitive
description:
name: win32
sha256: "6b75ac2ddd42f5c226fdaf4498a2b04071c06f1f2b8f7ab1c3f77cc7f2285ff1"
url: "https://pub.dev"
source: hosted
version: "2.7.0"
sdks:
dart: ">=2.19.4 <3.0.0"
flutter: ">=3.3.0"
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
sdk: flutter
cupertino_icons: ^1.0.2
flame: 1.6.0
dart_console: ^1.1.0
dev_dependencies:
flutter_test:
sdk: flutter
Expand Down

0 comments on commit 48386d3

Please sign in to comment.