Code Monkey home page Code Monkey logo

tetris's Issues

rotate的实现

昨天看了网上的代码,貌似他们都是为每个block定义一个shape数组,把4种形态都放进去,然后每次rotate就shapeIndex = (shapeIndex+1)%4; 感觉用这种方法来实现还行。

Codeblock中有Compile选项可设置

Settings -> Compile and Debugger -> Linker settings

Add the .dll (Dynamic link library, I think it is the same as the .so in Linux) in the Link Libraries.

Have fun.

Compile error(c2c4005438 )

display.cpp:39:22: 错误: 不能将形参‘block’声明为具有抽象类型‘Block’
In file included from display.cpp:8:0:
Headers/cal_point.h:15:7: 附注: 因为下列虚函数在‘Block’中为纯虚函数:
Headers/cal_point.h:27:18: 附注: virtual void Block::rotate()
display.cpp: 在函数‘void drawTetris()’中:
display.cpp:80:17: 错误: 无法为有抽象类型‘Block’的对象分配内存
In file included from display.cpp:8:0:
Headers/cal_point.h:15:7: 附注: 因为类型‘Block’有纯虚函数

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.