Giter Site home page Giter Site logo

llk's Introduction

LLK

基于QT的连连看游戏

  1. 该游戏为连连看简洁版使用c++的QT实现。

2.该游戏使用MVC三层设计模式与面向对象设计来实现

3.该游戏实现了两种游戏模式:基础模式和休闲模式。

4.该游戏在进行游戏时,可以进行背景音乐以及游戏音效的设置。

5.该游戏目前为第一版本,存在一些小bug在所难免,有空我会完善。

6.该游戏提供了可以升级和拓展的接口,要想增加一个游戏模式,只需增加一个BasicGame的子类,一个GameController的子类,一个GameService的子类即可,然后重写各个新增的子类中的必须实现的函数即可。

7.该游戏目前有个明显的bug,那就是如果在进行游戏过程中频繁进行重排,会导致内存溢出而游戏意外停止的情况,这是因为在写这个游戏的时候使用的是继承于Qwidget然后重写paintEvent()这个函数的方式进行渲染游戏图片。由于画笔每次更新绘画新的图片界面时,会直接掩盖掉之前的图片,但是之前的图片的内存未进行时释放,随着积累,这个情况加剧机会导致程序因为内存不够的原因导致程序崩溃。至于解决办法,目前想到的一个比较简单的解决办法是:将每个图片放到一个QPushButton上,然后一个游戏界面就是10*10的二维数组存储的是QPushbutton,每个QPushbutton对应游戏中的一个图片,每当消去一个图片时,就把这个按钮隐藏即可。

llk's People

Contributors

ljf2402901363 avatar

Stargazers

 avatar

Watchers

 avatar

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.