|
@@ -0,0 +1,25 @@
|
|
|
+package door
|
|
|
+
|
|
|
+type Screen struct {
|
|
|
+ Panels []Panel
|
|
|
+}
|
|
|
+
|
|
|
+func (s *Screen) AddPanel(panel Panel) {
|
|
|
+ s.Panels = append(s.Panels, panel)
|
|
|
+}
|
|
|
+
|
|
|
+func (s *Screen) Output() string {
|
|
|
+ var result string
|
|
|
+ for idx, _ := range s.Panels {
|
|
|
+ result += s.Panels[idx].Output()
|
|
|
+ }
|
|
|
+ return result
|
|
|
+}
|
|
|
+
|
|
|
+func (s *Screen) Update() string {
|
|
|
+ var result string
|
|
|
+ for idx, _ := range s.Panels {
|
|
|
+ result += s.Panels[idx].Update()
|
|
|
+ }
|
|
|
+ return result
|
|
|
+}
|