summaryrefslogtreecommitdiff
path: root/lib/models
diff options
context:
space:
mode:
authorOrangerot <purple@orangerot.dev>2025-01-11 18:22:32 +0100
committerOrangerot <purple@orangerot.dev>2025-01-11 18:22:32 +0100
commitcd061eceeb421d6bec5cd38bf9f315036ce88887 (patch)
tree2ad0ad6101d6fa60d23edf05fccc2208c41c15cb /lib/models
parentf98162b6d8ed70e571440c539ef053dce09f704d (diff)
style: refactored into folder structure
Diffstat (limited to 'lib/models')
-rw-r--r--lib/models/arrow_direction.dart12
-rw-r--r--lib/models/input_direction.dart13
-rw-r--r--lib/models/note.dart10
3 files changed, 35 insertions, 0 deletions
diff --git a/lib/models/arrow_direction.dart b/lib/models/arrow_direction.dart
new file mode 100644
index 0000000..5f0298b
--- /dev/null
+++ b/lib/models/arrow_direction.dart
@@ -0,0 +1,12 @@
+import 'package:flutter/material.dart';
+
+enum ArrowDirection {
+ left(Icons.arrow_back),
+ down(Icons.arrow_downward),
+ up(Icons.arrow_upward),
+ right(Icons.arrow_forward);
+
+ const ArrowDirection(this.icon);
+
+ final IconData icon;
+}
diff --git a/lib/models/input_direction.dart b/lib/models/input_direction.dart
new file mode 100644
index 0000000..08096c7
--- /dev/null
+++ b/lib/models/input_direction.dart
@@ -0,0 +1,13 @@
+class InputDirection {
+ bool up = false;
+ bool down = false;
+ bool left = false;
+ bool right = false;
+
+ void reset() {
+ up = false;
+ down = false;
+ left = false;
+ right = false;
+ }
+}
diff --git a/lib/models/note.dart b/lib/models/note.dart
new file mode 100644
index 0000000..bcc6ac6
--- /dev/null
+++ b/lib/models/note.dart
@@ -0,0 +1,10 @@
+import 'package:sense_the_rhythm/models/arrow_direction.dart';
+
+class Note {
+ final double time;
+ final ArrowDirection direction;
+ double position = 0;
+ bool? wasHit;
+
+ Note({required this.time, required this.direction});
+}