Skip to content

Commit 8a96669

Browse files
committed
update data
1 parent 68c2044 commit 8a96669

File tree

5 files changed

+8
-13
lines changed

5 files changed

+8
-13
lines changed

第一季 从零开始写游戏服务器 第二期/最新课节--课程代码/vender/src/LollipopGo/LollipopGo/match/match.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ package match
1010
达到最大匹配时间,则跳过等待下一秒的匹配;如果达到最大匹配时间,还是没匹配到足够的人,则给这个几个人
1111
凑机器人,提交匹配成功。
1212
13-
1413
*/
1514

1615
type MatchMoudle interface {
1716
GetMatchResult(string, int) []byte
1817
PutMatch([]byte)
1918
GetMatchNum(string) int
2019
TimerMatch()
20+
DestroyMatch()
2121
}

第一季 从零开始写游戏服务器 第二期/最新课节--课程代码/vender/src/LollipopGo/LollipopGo/match/pool_match.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,16 @@ func newPoolMatch(IMax int) (MapPoolMatch chan map[int]*PoolMatch) {
2323

2424
func (this *PoolMatch) PutMatch(data map[int]*PoolMatch) {
2525
if len(MapPoolMatch) >= PoolMax {
26-
log.Debug("超过了pool的上限!")
26+
log.Debug("超过了 pool的上限!")
2727
return
2828
}
2929
MapPoolMatch <- data
3030
}
3131

32-
func (this *PoolMatch) GetMatchResult() {
32+
func (this *PoolMatch) GetMatchResult() {}
3333

34-
}
35-
36-
func (this *PoolMatch) GetMatchNum() {
34+
func (this *PoolMatch) GetMatchNum() {}
3735

38-
}
36+
func (this *PoolMatch) TimerMatch() {}
3937

40-
func (this *PoolMatch) TimerMatch() {
41-
42-
}
38+
func (this *PoolMatch) DestroyMatch() {}

第一季 从零开始写游戏服务器 第二期/最新课节--课程代码/vender/src/LollipopGo/LollipopGo/match/room_match.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ type RoomMatch struct {
1414
RoomPlayerMap map[string]*player.PlayerSt // 房间玩家的结构信息
1515
}
1616

17-
// 新注册匹配
18-
func newMatch() (MapMatch map[string]*RoomMatch) {
17+
func newRoomMatch() (MapMatch map[string]*RoomMatch) {
1918

20-
return nil
19+
return make(MapMatch map[string]*RoomMatch)
2120
}

0 commit comments

Comments
 (0)