Code Monkey home page Code Monkey logo

pku_bombercat's Introduction

PKU泡泡堂(PKU BomberCat)

简介

扮演可爱的人气猫咪, 安放炸弹抵抗入侵PKU的神秘敌人吧!

运行

从命令行启动: java -cp bin main.Game

双击启动: 双击"PKU泡泡堂.jar"

游戏操作

上下左右键移动, 空格安放炸弹. 消灭所有敌人获得游戏成功!

道具模式: 炸毁障碍物有概率获得不同的道具加成.

挑战模式: 和敌人的接触会受到伤害. 敌人有护盾, 需要多个炸弹连锁爆炸来造成伤害.

文件组织

bin: 存放编译后的文件.

res: 存放地图、贴图、简介文本和游戏音效.

src: 存放源代码文件.

源代码组织和类的设计

avatar

Game: 负责管理事件循环和其他对象. 存放在main文件夹下.

GameMap: 负责对地图上所有对象建立基于空间位置的索引. 存放在BaseObject下.

MainRenderer: 渲染游戏画面, 管理可视化窗口. 存放在render下.

BasePlayer: 表示玩家父类, 子类对应人类和AI玩家. 存放在BasePlayer下.

BaseObject: 表示游戏中的各种对象, 如障碍物, 炸弹和道具等. 该类及其子类存放在BaseObject下.

GameKeyListener和MusicPlayer: 监听玩家键盘输入和播放音乐的类, 存放在thread下. 这两个任务是时延敏感的, 因此单独占据线程.

pku_bombercat's People

Contributors

acmlczh avatar roaringcat1217 avatar toto2134 avatar flere825 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.