This commit is contained in:
2026-08-08 10:57:54 +08:00
parent d0d48c1ffc
commit 604af909b0
184 changed files with 12521 additions and 12722 deletions
+24
View File
@@ -0,0 +1,24 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:arcx/features/scoring/application/score_math.dart';
void main() {
group('ScoreMath', () {
test('center hit scores 10', () {
expect(ScoreMath.scoreFor(0, 0), 10);
});
test('outer edge scores low', () {
expect(ScoreMath.scoreFor(0.95, 0), 1);
});
test('beyond radius is a miss (0)', () {
expect(ScoreMath.scoreFor(1.2, 0), 0);
});
test('distance from center is non-negative', () {
expect(ScoreMath.distance(0, 0), 0);
expect(ScoreMath.distance(1, 0), closeTo(1, 0.0001));
});
});
}