Giter Site home page Giter Site logo

mailgyc / doudizhu Goto Github PK

View Code? Open in Web Editor NEW
471.0 23.0 205.0 21.45 MB

html5 斗地主游戏

Home Page: https://m.ihouser.com

Python 46.79% HTML 2.51% JavaScript 42.50% PLSQL 7.38% CSS 0.64% Mako 0.18%
tornado mysql aiomysql asyncio game-server phaser sqlalchemy

doudizhu's Introduction

斗地主   

Build Status    Coverage Status    MIT Licence

斗地主游戏,后端基于Python+Tornado+MySQL开发,前端 Phaser 引擎

Dependencies

  • Python3.8+
  • Mysql5.7+

Quick Start

    git clone https://github.com/mailgyc/doudizhu
    cd doudizhu
    mysql --user=root -p < schema.sql
    pip3 install -r requirements.txt
    cd server
    export DATABASE_URI=mysql+aiomysql://root:[email protected]:3306/ddz
    python3 app.py
    Now visit http://127.0.0.1:8080

运行截图

doudizhu's People

Contributors

chang-guofeng avatar dependabot[bot] avatar leondelee avatar mailgyc avatar mailgyc-163 avatar yrong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doudizhu's Issues

报错了

Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/tornado/web.py", line 1511, in _execute
result = yield result
File "/Library/Python/2.7/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/Library/Python/2.7/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "/Library/Python/2.7/site-packages/tornado/gen.py", line 292, in wrapper
result = func(*args, **kwargs)
File "/Users/apple/Downloads/doudizhu-master/server/handler/web.py", line 53, in get
self.render("auth_login.htm", error=None)
File "/Library/Python/2.7/site-packages/tornado/web.py", line 724, in render
html = self.render_string(template_name, **kwargs)
File "/Library/Python/2.7/site-packages/tornado/web.py", line 862, in render_string
t = loader.load(template_name)
File "/Library/Python/2.7/site-packages/tornado/template.py", line 427, in load
self.templates[name] = self._create_template(name)
File "/Library/Python/2.7/site-packages/tornado/template.py", line 454, in _create_template
with open(path, "rb") as f:
IOError: [Errno 2] No such file or directory: '/Users/apple/Downloads/doudizhu-master/server/templates/auth_login.htm'
2017-06-14 00:44:37,536 - ERROR - 500 GET /auth/login?next=%2F (::1) 0.88ms

请教

我想写一个python web五子棋,当我用python 写完牌型和发牌后,我不知道后面该这么写了(关于网络)。
可以加我qq:1964893266
指导我嘛

[Docker] Docker安装方式的询问和请求

我看项目历史中有过对docker compose文件的编写,但是后来没有被放进main branch里面。请问本项目不进行docker部署方式的开发是有什么顾虑吗,需要提交相关代码吗?

关于License

请问如果引用这个repo,遵从什么样的license,我们想用于非商业用途。

运行没反应

你好,我想问下我运行python3后没反应是怎么回事,另外我数据库是没有密码的,所以我就运行这个命令python3 app.py --password=

运行

浏览器怎么访问?访问地址,菜鸟请教

Can't connect to MySQL server on'localhost'

Python: 3.6.3
MySQL: 8.0.17

你好,我按教程进行操作,进入8080后输入完账号密码,点击注册按钮时,游戏界面红色字体报错:

pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on'localhost'")

以下是我的操作记录:

E:\Output\Python_output\CCP\doudizhu>net start mysql
mysql 服务正在启动 ..
mysql 服务已经启动成功。


E:\Output\Python_output\CCP\doudizhu>mysql --user=root -p < schema.sql
Enter password: *****

E:\Output\Python_output\CCP\doudizhu>cd doudizhu

E:\Output\Python_output\CCP\doudizhu\doudizhu>python app.py --password=mysql
2019-08-31 18:13 server on http://127.0.0.1:8080

请问如何解决,谢谢!

数据库问题

mysql --user=root -p < schema.sql
Enter password:
ERROR 1293 (HY000) at line 5: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

  • [ ]

ERROR 1064 (42000) at line 15: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{},

你好作者,我在执行
mysql --user=root -p < schema.sql
时报了错误:ERROR 1064 (42000) at line 15: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{},
经验证,是schema.sql 文件中第17行代码导致的 :round JSON default {},
我不懂sql语句,互联网也没有查到与之相关错误信息,请作者帮忙分析一下,谢谢。

Fail to install msgpack-python for python 3.6.0

using pip3 install msgpack-python.

I get error:

Exception:
Traceback (most recent call last):
File "c:\users\godspeed\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat_init_.py", line 73, in console_to_str
return s.decode(sys.stdout.encoding)

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 116: invalid start byte

During handling of the above exception, another exception occurred:

游戏无法正常结束

AI模式下,在弹出地主赢这一消息以后,游戏还在继续进行,请问这个怎么解决呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.