feat(m3a): playable flame client with camera, hud and device perf gate

This commit is contained in:
2026-10-24 22:54:29 +02:00
parent e77595eaf0
commit a30784479b
15 changed files with 1238 additions and 144 deletions
+26 -25
View File
@@ -1,30 +1,31 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility in the flutter_test package. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:iron_arc/main.dart';
import 'package:iron_arc/src/game/iron_arc_game.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
test('HudState compares by value', () {
const a = HudState(
turn: 1,
current: 0,
wind: 3,
hp0: 100,
hp1: 100,
phase: 0,
winner: 254,
aimAngle: 45,
aimPower: 0.6,
);
final b = HudState(
turn: a.turn,
current: a.current,
wind: a.wind,
hp0: a.hp0,
hp1: a.hp1,
phase: a.phase,
winner: a.winner,
aimAngle: a.aimAngle,
aimPower: a.aimPower,
);
expect(a, equals(b));
expect(a.hashCode, equals(b.hashCode));
});
}