a test suite to help you implement a famous falling blocks game
Latest commit 1350ca8 Oct 7, 2016 @darkf darkf committed on GitHub Merge pull request #52 from adrian17/master
Add a link to the Wiki in initial help message


The Learntris Challenge

Learntris is a set of automated tests that will guide you through implementing your own version of Tetris, that famous Soviet falling blocks game.

The game is a fairly small project suitable for beginners who understand the basic concepts of programming, or for veteran developers looking to pick up a new language.

Along the way, it will expose you to some common software engineering tools, practices, and buzzwords that might not be familiar to you:

Note: This is not a tutorial, in that it will not tell you how to do things, just guide you on what to do -- the implementation is up to you. Are you up for the challenge?

While the tests are about implementing a video game, the real purpose of this exercise is to force you to "fend for yourself" on a project, without relying on tutorial-style guidance.

Instead, the tests present a series of problems that you will need to solve in order to implement the game.

It is entirely up to you how to write the code. Design it however you wish -- there are no wrong answers.

While the tests themselves are written in Python, you are free to implement your game in any language you like. Python will run the tests on your program regardless of what language it is in.

Getting Started

The first step is to git clone or fork this repository and run testris.py. You will need a recent version of Python, preferably Python 3.2 or later, but Python 2.x works fine as well. (Remember: Python is only for the test runner. You can use any language you want to write your implementation.)

The output of testris.py will tell you what needs to be done at every step along the way. Just keep running it, and do what it guides you to do. Please read Understanding the Test Results briefly before getting started! The wiki here also has a couple pages on Getting Set Up.

Important: The tests expect you to receive commands as input over standard input (commonly called stdin), e.g. via input() in Python, scanf/getline/getchar/etc in C, and so on. This is not the same thing as command-line arguments that you pass via the terminal: it's what you're using when you type in input to a running program.

If you get stuck, please come join us in our IRC chatroom (links to a Web chat) at #learnprogramming on irc.freenode.net, and we'll try to help you sort it out.

Good luck, and most importantly: have fun!