Code Monkey home page Code Monkey logo

minecraft2d's Introduction

Minecraft2D


游戏概述

在控制台上用键盘玩mc,俯视图二维版本。十分精简生草。

游戏玩法

↑↓←→控制玩家朝向或者移动

空格 相当于mc中拿着当前的物体左键

回车 相当于右键,比如放置、吃食物、取决于您手上目前是什么物品

0123456789 相当于切换物品栏上的物品,相当于mc中的鼠标滚轮。

a c 控制可合成的物品列表滚动选择

c 合成物品

游戏启动

编译 game.cpp 即可

minecraft2d's People

Contributors

littlefean avatar

Stargazers

FSW avatar  avatar  avatar  avatar SeeYa avatar

Watchers

 avatar

Forkers

ninter6

minecraft2d's Issues

bug

gcc 12.2.0编译出错,报错如下:
In file included from Player.h:10,
from printer.h:10,
from game.cpp:11:
object.h: In function 'bool isEatable(GameObject)':
object.h:218:23: error: 'class std::unordered_map<GameObject, int>' has no member named 'contains'
218 | if (foodTastiness.contains(o)) {
| ^~~~~~~~
Player.h: In member function 'bool Player::digBlock(GameObject)':
Player.h:87:26: error: 'class std::unordered_map<GameObject, int>' has no member named 'contains'
87 | if (ToolDigLevel.contains(tool)) {
| ^~~~~~~~
Player.h: In member function 'void Player::loseObject(GameObject)':
Player.h:121:13: error: 'raise' was not declared in this scope
121 | raise(101);
| ^~~~~
命令:g++ -s game.cpp game.exe

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.