Giter VIP home page Giter VIP logo

tetris's Issues

Add a fast-drop key

I really miss a fast-drop key (the down key in some implementations) for situations where I want to “tuck” a piece under another, and so have to wait for the falling one to drop all the way down.

I confess that I tried doing it myself, but got utterly confused by the code. Is that because I'm bad at C? Or because the original code was obfuscated? Who knows.

In particular, I leave these two questions:

  1. How does the c < 0 branch of the main loop get executed? c is only updated via getchar(), which won't read an EOF from stdin, unless I am missing something…
  2. How does the timer affect updates? It clearly does, because removing the signal handler halts updates. But it does nothing else other than just resetting the timer itself! Somehow, it's what appears to make the code go to the c < 0 branch.

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.