main.go 748 B

12345678910111213141516171819202122232425262728293031323334
  1. package main
  2. import (
  3. "fmt"
  4. "strings"
  5. )
  6. func main() {
  7. var o Object = Object{
  8. Id: 1,
  9. Kind: KPlayer,
  10. Name: "Bob",
  11. Description: "Hello World!",
  12. Password: "12345",
  13. Location: 2,
  14. Owner: 0,
  15. Health: ValueRange{Value: 10, Max: 10},
  16. Magic: ValueRange{Value: 0, Max: 0},
  17. BuildPoints: ValueRange{Value: 3, Max: 10},
  18. Level: 1,
  19. Experience: ValueRange{Value: 0, Max: 80},
  20. Inventory: map[Id]uint64{
  21. 3: 1,
  22. },
  23. Exits: make(map[string]Id),
  24. Motd: "",
  25. CoOwner: 0,
  26. SeniorOfficers: []Id{},
  27. Officers: []Id{},
  28. Members: []Id{},
  29. }
  30. fmt.Printf("o is %v\r\n", o.valid())
  31. fmt.Printf("%s", strings.ReplaceAll(o.render(), "\n", "\r\n"))
  32. }