forked from shihuaping/gamex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38eec23
commit 177adb2
Showing
11 changed files
with
173 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
中央服务器 | ||
|
||
功能:服务注册,服务查询 | ||
每一类服务器都有一个单独编号,编号是递增的。如果服务停掉了,这个编号可能会被下一个启动的服务使用。 | ||
每个服务都可以带有扩展信息,但是不建议使用,因为一旦添加了扩展信息就意味着中央服务器要修改,中央服务器修改后就需要重启。而中央服务器是单点,一重启就会导致客户端全部掉线。这个编号是给客户端用的,但同一个游戏有多个服务器的时候,用户连上网关以后,网关需要根据这个编号去找对应的服务器。否则就要保证服务端端口永不重复。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1 @@ | ||
|
||
|
||
//游戏开始 | ||
function gameStart() { | ||
|
||
} | ||
|
||
//游戏结束 | ||
function gameEnd() { | ||
|
||
} | ||
|
||
function gameMessage() { | ||
|
||
} | ||
|
||
//出牌 | ||
function outCard() { | ||
|
||
} | ||
|
||
//过牌 | ||
function passCard() { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
roomIDList = []; | ||
roomList = {}; | ||
|
||
function initRoomIDList() { | ||
|
||
} | ||
|
||
function getRoomID() { | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
|
||
// room - desk | ||
|
||
//房间列表暂时不存数据库了 | ||
|
||
function createRoom(socket, packet) { | ||
|
||
} | ||
|
||
function enterRoom(socket, packet) { | ||
|
||
} | ||
|
||
function leaveRoom(socket, packet) { | ||
|
||
} | ||
|
||
function dismissRoom(socket, packet) { | ||
|
||
} | ||
|
||
function reenterRoom(socket, packet) { | ||
|
||
} | ||
|
||
function queryPlayInfo(socket, packet) { | ||
|
||
} | ||
|
||
function playerSitDown(socket, packet) { | ||
|
||
} | ||
|
||
function playerReady(socket, packet) { | ||
|
||
} | ||
|
||
function playerStandUp(socket, packet) { | ||
|
||
} | ||
|
||
function playerWatch(socket, packet) { | ||
|
||
} | ||
|
||
function playerOpeCard(socket, packet) { | ||
|
||
} | ||
|
||
function playerWin(socket, packet) { | ||
|
||
} | ||
|
||
function kickPlayer(socket, packet) { | ||
|
||
} | ||
|
||
exports.createRoom = createRoom; | ||
exports.enterRoom = enterRoom; | ||
exports.dismissRoom = dismissRoom; | ||
exports.reenterRoom = reenterRoom; | ||
exports.leaveRoom = leaveRoom; | ||
exports.queryPlayerInfo = queryPlayInfo; | ||
exports.playerSitDown = playerSitDown; | ||
exports.playerReady = playerReady; | ||
exports.playerStandUp = playerStandUp; | ||
exports.playerWatch = playerWatch; | ||
exports.playerOpeCard = playerOpeCard; | ||
exports.playerWin = playerWin; | ||
exports.kickPlayer = kickPlayer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters