Commit | Line | Data |
---|---|---|
03b67a73 TW |
1 | package kaka.cakelight; |
2 | ||
3 | import javafx.scene.paint.Color; | |
4 | ||
5 | public class LedFrame { | |
6 | private Color[] leds; | |
7 | ||
8 | public static LedFrame from(Configuration config) { | |
9 | LedFrame frame = new LedFrame(); | |
10 | frame.leds = new Color[config.leds.cols * 2 + config.leds.rows * 2]; | |
11 | return frame; | |
12 | } | |
13 | ||
14 | public void setLedColor(int led, Color color) { | |
15 | leds[led] = color; | |
16 | } | |
17 | ||
18 | public Color getLedColor(int led) { | |
19 | return leds[led]; | |
20 | } | |
21 | } |