FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Snake-Game-JavaScript-Python-Unity/quick.py at main · masterai-top/Snake-Game-JavaScript-Python-Unity · GitHub
masterai-top
/
Snake-Game-JavaScript-Python-Unity
Public
Notifications
You must be signed in to change notification settings
Fork
2
Star
3
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Snake-Game-JavaScript-Python-Unity
/
quick.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (19 loc) · 868 Bytes
Breadcrumbs
Snake-Game-JavaScript-Python-Unity
/
quick.py
Copy path
File metadata and controls
23 lines (19 loc) · 868 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! -*- coding:utf-8 -*-
# Author: qianyong
# Created: 2016.06.24 20.53
import
freetime
.
util
.
log
as
ftlog
from
poker
.
entity
.
configure
import
gdata
from
poker
.
protocol
import
runcmd
from
poker
.
protocol
.
decorator
import
markCmdActionHandler
,
markCmdActionMethod
from
hall
.
servers
.
common
.
base_checker
import
BaseMsgPackChecker
@
markCmdActionHandler
class
RoomTcpHandler
(
BaseMsgPackChecker
):
@
markCmdActionMethod
(
cmd
=
'room'
,
action
=
"quick_start"
,
clientIdVer
=
0
,
scope
=
'game'
)
def
doRoomQuickStart
(
self
,
roomId
,
userId
):
msg
=
runcmd
.
getMsgPack
()
ftlog
.
debug
(
'msg='
,
msg
,
caller
=
self
)
gdata
.
rooms
()[
roomId
].
doQuickStart
(
msg
)
@
markCmdActionMethod
(
cmd
=
'room'
,
action
=
"leave"
,
clientIdVer
=
0
,
scope
=
'game'
)
def
doRoomLeave
(
self
,
roomId
,
userId
):
msg
=
runcmd
.
getMsgPack
()
gdata
.
rooms
()[
roomId
].
doLeave
(
userId
,
msg
)
Back
|
FazBrowse Home
|
New Git URL