~nromdotcom/gemif

ref: f1ef4d543cc010bb97d0d825503ff0ece1841ed7 gemif/pkg/gamemanager/room.go -rw-r--r-- 785 bytes
f1ef4d54Norm MacLennan README updates for new features 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package gamemanager

// Room contains information about a room and its Exits.
type Room struct {
	ID          string `yaml:"room_id" json:"room_id" binding:"uuid"`
	Name        string `yaml:"room_name" json:"room_name"`
	Description string `yaml:"room_description" json:"room_description"`
	Exits       []Exit `yaml:"exits" json:"exits"`
}

// Exit describes actions applied to GameState as part of leaving a Room.
type Exit struct {
	ID           string `yaml:"exit_id" json:"exit_id" binding:"uuid"`
	Description  string `yaml:"exit_description" json:"exit_description"`
	Destination  string `yaml:"destination_id" json:"destination_id" binding:"uuid"`
	SetCondition string `yaml:"set_condition" json:"set_condition"`
	IfCondition  string `yaml:"if_condition" json:"if_condition"`
}