示例#1
0
文件: server.go 项目: runningwild/sgf
// MakeMinorUpdate will apply the update to the local gamestate before returning
// and will queue up the update to be sent to all other clients on an unreliable
// and ordered channel.
func (c *Client) MakeMinorUpdate(update types.Update) {
	c.GameMutex.Lock()
	update.ApplyUpdate(-1, c.Game)
	c.GameMutex.Unlock()
	c.MinorUpdatesChan <- update
}
示例#2
0
文件: server.go 项目: runningwild/sgf
// MakeMajorUpdate will apply the update to the local gamestate before returning
// and will queue up the update to be sent to all clients on a reliable and
// ordered channel.
func (host *Host) MakeMajorUpdate(update types.Update) {
	host.GameMutex.Lock()
	update.ApplyUpdate(-2, host.Game)
	host.GameMutex.Unlock()
	host.majorUpdates <- update
}