Need help with learntris?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

LearnProgramming
210 Stars 277 Forks MIT License 114 Commits 16 Opened issues

Description

a test suite to help you implement a famous falling blocks game

Services available

!
?

Need anything else?

Contributors list

# 207,280
Shell
add-on
sequenc...
blender
62 commits
# 138,115
c-plus-...
repl
Android
CSS
21 commits
# 482,790
Python
C#
3 commits
# 522,241
Python
2 commits
# 575,424
Python
1 commit
# 585,552
Python
1 commit
# 83,459
cookies
CSS
datadog
curio
1 commit
# 583,769
Python
1 commit
# 587,301
Python
1 commit
# 580,319
Python
1 commit
# 575,425
Python
1 commit
# 259,818
Python
Shell
Flask
websock...
1 commit
# 55,445
c-plus-...
Discord
msbuild
python3
1 commit
# 152,528
verilog
C++
mbed
Arduino
1 commit

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!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.