Skip to content

Commit ff3fe84

Browse files
committed
ledmatrix: More interesting pong game animation
Plays a short interesting game Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent d9e6ffd commit ff3fe84

File tree

1 file changed

+74
-3
lines changed

1 file changed

+74
-3
lines changed

fl16-inputmodules/src/games/pong_animation.rs

Lines changed: 74 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::matrix::Grid;
44

55
pub struct PongIterator {
66
state: PongState,
7-
commands: [Option<GameControlArg>; 64],
7+
commands: [Option<GameControlArg>; 136],
88
current_command: usize,
99
}
1010

@@ -36,8 +36,7 @@ impl Iterator for PongIterator {
3636
}
3737
}
3838

39-
// TODO: Plan out a nice looking game
40-
const SAMPLE_GAME: [Option<GameControlArg>; 64] = [
39+
const SAMPLE_GAME: [Option<GameControlArg>; 136] = [
4140
Some(GameControlArg::Left), // Middle
4241
None,
4342
Some(GameControlArg::Left),
@@ -54,6 +53,78 @@ const SAMPLE_GAME: [Option<GameControlArg>; 64] = [
5453
None,
5554
None,
5655
None,
56+
Some(GameControlArg::Right),
57+
None,
58+
None,
59+
None,
60+
None,
61+
None,
62+
None,
63+
Some(GameControlArg::Right),
64+
None,
65+
None,
66+
None,
67+
None,
68+
None,
69+
None,
70+
None,
71+
None,
72+
None,
73+
None,
74+
None,
75+
None,
76+
None,
77+
None,
78+
None,
79+
None,
80+
None,
81+
None,
82+
None,
83+
None,
84+
None,
85+
None,
86+
None,
87+
None,
88+
None,
89+
None,
90+
None,
91+
None,
92+
None,
93+
None,
94+
None,
95+
None,
96+
None,
97+
None,
98+
None,
99+
Some(GameControlArg::SecondLeft),
100+
None,
101+
Some(GameControlArg::SecondLeft),
102+
None,
103+
Some(GameControlArg::SecondRight),
104+
None,
105+
None,
106+
Some(GameControlArg::SecondLeft),
107+
None,
108+
None,
109+
Some(GameControlArg::Right),
110+
None,
111+
None,
112+
Some(GameControlArg::Left),
113+
None,
114+
Some(GameControlArg::Right),
115+
None,
116+
None,
117+
Some(GameControlArg::Left),
118+
None,
119+
None,
120+
None,
121+
None,
122+
None,
123+
None,
124+
None,
125+
None,
126+
Some(GameControlArg::Right),
127+
Some(GameControlArg::Right),
57128
None,
58129
None,
59130
None,

0 commit comments

Comments
 (0)