Git Product home page Git Product logo

multiplayer-minesweeper's Introduction

网页版在线多人扫雷

中文 | English

简介

​ 这是一个小的课程设计,缺点挺多,各位看官轻喷。

说明

  1. 我们的服务器带宽很低,所以应用的实现会采取一些不会给后端太大压力的方法。(前端人较为辛苦)(指后端人经常对前端人指手画脚)
  2. 服务器不打算公网开放,暂定游戏账户的获取方式为:内部创建+邀请码注册。
  3. 网站安全性较低,也请知道网址的的用户不要通过脚本注入、sql注入或其他各种方式攻击我们。
  4. 大部分JavaScript代码和Css代码内置于HTML文件中,所以显示HTML文件占比很高。

开发人员

​ 前端(凯爷无敌):Wkzlike (github.com)

​ 前端(R老师是最正义的!): StarWYMM (github.com)

​ 后端(臭鱼烂虾): Wldcmzy (github.com)

​ 后端兼各类软件文档(什么神仙):xxinyux (github.com)

实现方式

html+css+javascript前端 + flask后端框架 + websocket传输数据

flask-login文档没搞明白,就胡搞了一个身份验证逻辑

后端结构

后端结构图

核心算法分析

传送门:分类: 网页版多人扫雷 | 蓝湖畔淅淅沥沥的雨 (wldcmzy.github.io)

开服步骤

  1. 根据databasecode.txt文件,在数据库中建好表,搞好权限(本项目没有写自动创建)。
  2. 在ClearmindBase.config.py 中设置好配置信息。
  3. 在main.py中设置端口号并直接运行此脚本开启游戏服务。

游戏机制

  1. 需要注册登录,注册需要有邀请码。
  2. 左键扫雷,右键查看本局排行榜,不能标旗和智能开图。
  3. 每一局结束后弹出弹窗显示本局最终战绩,下一局自动开始。
  4. 右键菜单中有总排行榜的链接。
  5. 太久未操作或页面关闭会导致身份信息注销,想正常游戏需要重新登录。

效果图

效果图

总榜效果图

可以预见的可扩展功能

​ 1.数据库userInfo表中ifOnline属性设置但并未使用,后期可以改名作为“该用户是否被注销的标志位”

额外说明

本项目仅供学习使用

我们不接受任何捐赠

没什么可说的乐(

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.