2022-05-17 23:29:59 -04:00
|
|
|
package simulator
|
|
|
|
|
2022-05-19 15:18:03 -04:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
2022-05-17 23:29:59 -04:00
|
|
|
//Tile is a tile
|
|
|
|
type Tile struct {
|
2022-05-19 17:09:46 -04:00
|
|
|
Building Object
|
|
|
|
User *Player
|
2022-05-17 23:29:59 -04:00
|
|
|
}
|
2022-05-19 15:18:03 -04:00
|
|
|
|
|
|
|
func (t *Tile) String() string {
|
|
|
|
var res string
|
2022-05-19 17:09:46 -04:00
|
|
|
if t.Building != nil {
|
|
|
|
res += fmt.Sprintf("There is a %v here\n", t.Building.Describe())
|
2022-05-19 15:18:03 -04:00
|
|
|
} else {
|
|
|
|
res += "Nothing here"
|
|
|
|
}
|
|
|
|
return res
|
|
|
|
}
|