24 lines
465 B
Dart
24 lines
465 B
Dart
import 'package:dartterm/algorithms/geometry.dart' as geo;
|
|
import 'package:dartterm/terminal.dart';
|
|
import 'package:dartterm/world/level.dart';
|
|
|
|
Future<void> sitemode(Level level) async {
|
|
await _SiteMode(level).start();
|
|
}
|
|
|
|
class _SiteMode {
|
|
Level level;
|
|
late geo.Offset position;
|
|
|
|
_SiteMode(this.level) {
|
|
position = level.spawn;
|
|
}
|
|
|
|
Future<void> start() async {
|
|
while (true) {
|
|
at(0, 0).puts("Site mode!");
|
|
await zzz(0.1);
|
|
}
|
|
}
|
|
}
|