We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0610e74 commit fd01222Copy full SHA for fd01222
lib/rgb_matrix/animation/simon.ex
@@ -15,7 +15,7 @@ defmodule RGBMatrix.Animation.Simon do
15
16
defmodule State do
17
@moduledoc false
18
- defstruct [:leds, :simon_sequence, :state]
+ defstruct [:leds, :simon_sequence, :state, :colors]
19
end
20
21
@black Chameleon.RGB.new(0, 0, 0)
@@ -85,7 +85,7 @@ defmodule RGBMatrix.Animation.Simon do
85
rest -> %{state | state: {:expecting_input, rest}}
86
87
88
- {850, colors, state}
+ {500, colors, state}
89
90
91
@impl true
@@ -133,7 +133,7 @@ defmodule RGBMatrix.Animation.Simon do
133
HSV.new((:rand.uniform() * 360) |> trunc(), 100, 100)
134
135
136
- defp init_colors() do
+ defp init_colors(state) do
137
colors = for led <- state.leds, into: %{}, do: {led.id, random_color()}
138
%{state | colors: colors}
139
0 commit comments