package main type TileAnimated struct { name string idx int symbols []string colors []string } func (t *TileAnimated) Name() string { return t.name } func (t *TileAnimated) Type() TileType { return AnimatedTile } func (t *TileAnimated) Symbol() string { return t.symbols[t.idx] } func (t *TileAnimated) Color() string { return t.colors[t.idx] } func (t *TileAnimated) Next() { t.idx++ if t.idx >= len(t.symbols) { t.idx = 0 } } func (t *TileAnimated) ToMap() map[string]any { return map[string]any{ "name": t.name, "symbols": t.symbols, "colors": t.colors, } }