Questions tagged [tetris]
For challenges related to the classic arcade game Tetris.
18 questions
7
votes
10
answers
962
views
Official Tetris Piece Ordering
Classic Tetris was often a difficult game to play. One problem was that you could only work with the Tetris piece you were given, so if you had an awkward board, it would sometimes be difficult to ...
23
votes
3
answers
2k
views
Wait, which tetromino was that?
Background
Tetris is a single-player game played on a rectangular grid with tetromino pieces.
When you fill one or more lines with tetrominoes, the filled lines are removed, and all blocks above them ...
19
votes
5
answers
1k
views
Tetris! Final heights (Day 3)
Challenge Taken from my university code challenge contest
This is actually Day 0 but yesterdays' challenge was too easy and can be a dupe of another question here.
Tetris is a video game that became ...
18
votes
1
answer
1k
views
Tetris strategy
Your task is to implement a Tetris strategy balanced in terms of score vs code size.
In this version of the game tetrominoes are rotated and dropped from above into a grid of 20 rows and 10 columns. ...
55
votes
9
answers
5k
views
Which tetromino is this?
Given an unsigned 16-bit integer N, your task is to determine whether its binary representation mapped inside a 4x4 matrix is matching a tetromino shape, and if so, which shape it is.
Matrix
Each ...
5
votes
0
answers
417
views
Tetris overlooked move counter [closed]
Playing tetris is fun. Watching an AI play tetris is also fun.
Some tetris AIs will always ignore the possibility of maneuvering a piece under an overhang, which makes me sad.
It means that the ...
3
votes
1
answer
2k
views
Witness My Challenge (Tetris Puzzle)
Introduction
In the game The Witness (possible spoilers ahead) there is a group of puzzles that involve drawing a Tetris piece with your line while making sure that the symbol for the Tetris piece ...
38
votes
4
answers
4k
views
Given a list of Tetris moves, return the number of completed lines
Description
We consider a slightly simplified version of Tetris where each move consists of:
rotating the piece clockwise, 0 to 3 times
positioning the piece at a given column
fast drop
The goal is ...
13
votes
4
answers
601
views
Possible Tetris sequences
Write code to figure out whether a run of Tetris pieces could be generated by the official Tetris algorithm. Fewest bytes wins.
Official Tetris games generate the sequence of falling pieces in a ...
14
votes
1
answer
534
views
Connecting Gaps with Tetris Pieces
You should write a program or function which given a list of tetris blocks as input outputs or returns the biggest gap between two points in the same height level which the pieces can connect.
The 7 ...
35
votes
3
answers
3k
views
Programming Tetris Blocks (Literally)
In the game Tetris, there are 7 types of bricks or Tetriminoes, which are mathematically known as tetrominoes because they are all made with 4 square segments:
The have the names I, J, L, O, S, T, and ...
13
votes
1
answer
1k
views
Tetris Tangrams
Introduction
Tangrams are a classic puzzle involving arranging/fitting blocks into various shapes. From the Chinese 七巧板 - literally meaning "seven boards of skill". Let's take this idea ...
34
votes
18
answers
5k
views
Jumblers vs Rebuilders: Coding with Tetris Bricks
In traditional Tetris, there are 7 distinct tetromino bricks, each denoted by a letter similar to its shape.
...
8
votes
1
answer
3k
views
Solve a Tetris Puzzle (pack predefined shapes into optimal form)
The challenge is about finding an optimal solution on how to place a number of given shapes. It is oriented on the principle of Tetris, where it is optimal to pack the given pieces as tight as ...
10
votes
1
answer
2k
views
Find the best move in a game of Tetris
I like Tetris a lot, but I'm not very good at it. Just once I'd like to see that spaceship take off in front of my own eyes! And since computers are oh-so great at everything, the only possible ...