12345678910111213141516171819202122232425 |
- 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
- }
|