move player id to a separate package
Later, this package could hold stuff like MMR. It's just a type for now.
This commit is contained in:
parent
a0608dac03
commit
18ba9fd568
@ -1,13 +1,13 @@
|
|||||||
package game
|
package game
|
||||||
|
|
||||||
import "slices"
|
import (
|
||||||
|
"slices"
|
||||||
|
|
||||||
// PlayerID is a unique ID for a player.
|
"git.sunturtle.xyz/studio/shotgun/player"
|
||||||
// May just be IPv6 (or IPv4-in-6) of their connection, or a UUID.
|
)
|
||||||
type PlayerID [16]byte
|
|
||||||
|
|
||||||
type Player struct {
|
type Player struct {
|
||||||
ID PlayerID
|
ID player.ID
|
||||||
HP int8
|
HP int8
|
||||||
Items [8]Item
|
Items [8]Item
|
||||||
Cuffs CuffState
|
Cuffs CuffState
|
||||||
|
6
player/player.go
Normal file
6
player/player.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// Package player implements data about players outside games.
|
||||||
|
package player
|
||||||
|
|
||||||
|
// ID is a unique ID for a player.
|
||||||
|
// May just be IPv6 (or IPv4-in-6) of their connection, or a UUID.
|
||||||
|
type ID [16]byte
|
Loading…
Reference in New Issue
Block a user