summaryrefslogtreecommitdiff
path: root/pkg/ui/multiplayer/multiplayer.go
blob: 436388f4c8e97403fd85c43d87440d338eaf19a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package multiplayer

import (
	"github.com/boozec/rahanna/internal/network"
)

type GameNetwork struct {
	Server *network.TCPNetwork
	Peer   string
}

func NewGameNetwork(localID, localIP string, localPort int, callback func()) *GameNetwork {
	server := network.NewTCPNetwork(localID, localIP, localPort, callback)
	peer := ""
	return &GameNetwork{
		Server: server,
		Peer:   peer,
	}
}