Skip to content

Commit

Permalink
项目目录调整
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxiaobai authored and liuxiaobai committed May 15, 2018
1 parent f630169 commit c29cf05
Show file tree
Hide file tree
Showing 58 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

pip3 install -r requirements.txt

python3 main.py
python3 app.py

浏览器访问即可,端口默认8080

Expand Down
6 changes: 3 additions & 3 deletions src/main.py → app.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from tornado.options import define, options
import tornado.web
import tornado.websocket
from net.socket import SocketHandler
from net.web import WebHandler, UpdateHandler, RegHandler
from handlers.socket import SocketHandler
from handlers.web import WebHandler, UpdateHandler, RegHandler
from db import torndb

BASE_DIR = os.path.dirname(os.path.abspath(__file__))
Expand Down Expand Up @@ -54,8 +54,8 @@ def main():
tornado.options.parse_command_line()
app = Application()
app.listen(8080)
tornado.ioloop.IOLoop.current().start()
logger.info('listening on 8080')
tornado.ioloop.IOLoop.current().start()


if __name__ == '__main__':
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/core/player.py → core/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from tornado.websocket import WebSocketHandler

from core import rule
from net.protocol import Protocol as Pt
from handlers.protocol import Protocol as Pt

logger = logging.getLogger('ddz')

Expand Down
4 changes: 2 additions & 2 deletions src/core/robot.py → core/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

from core import rule
from core.player import Player
from net.protocol import Protocol as Pt
from handlers.protocol import Protocol as Pt

logger = logging.getLogger('ddz')


class AiPlayer(Player):

def __init__(self, uid: int, username: str, player: Player):
from net.loopback import LoopBackSocketHandler
from handlers.loopback import LoopBackSocketHandler
super().__init__(uid, username, LoopBackSocketHandler(self))
self.room = player.room

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/core/table.py → core/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from tornado.ioloop import IOLoop

from core.robot import AiPlayer
from net.protocol import Protocol as Pt
from handlers.protocol import Protocol as Pt

logger = logging.getLogger('ddz')

Expand Down
0 src/db/torndb.py → db/torndb.py
100755 → 100644
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/net/loopback.py → handlers/loopback.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tornado.ioloop import IOLoop

from net.socket import SocketHandler
from handlers.socket import SocketHandler


class LoopBackSocketHandler(SocketHandler):
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/net/web.py → handlers/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import bcrypt
from tornado.escape import json_encode

from net.base import BaseHandler
from handlers.base import BaseHandler


class WebHandler(BaseHandler):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/static/js/phaser.min.js → static/js/phaser.min.js

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/static/rule.json → static/rule.json

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c29cf05

Please sign in to comment.