Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tetris]

For challenges related to the classic arcade game Tetris.

19
votes
5answers
606 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
1answer
805 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. ...
54
votes
9answers
4k 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 ...
4
votes
0answers
282 views

Tetris overlooked move counter

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 ...
4
votes
1answer
526 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 ...
36
votes
4answers
1k 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 ...
11
votes
3answers
421 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
1answer
378 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 ...
32
votes
3answers
2k 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, ...
12
votes
0answers
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 and use the ...
34
votes
18answers
4k 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. ...
7
votes
1answer
2k 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
1answer
769 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 ...
8
votes
0answers
710 views

Tetris, Here We Go Again [closed]

Code Golfed Tetris Inspired by a popularity-question (Re)Implementing Tetris and a challenge on SO 3 years ago when PCG did not yet exist, the classy tetris has yet to live again in the art-work of ...
942
votes
6answers
193k views

Build a working game of Tetris in Conway's Game of Life

Here is a theoretical question - one that doesn't afford an easy answer in any case, not even the trivial one. In Conway's Game of Life, there exist constructs such as the metapixel which allow the ...
43
votes
7answers
11k views

(Re)Implementing Tetris

In the spirit of re-implementing classic video games, I would like to invite the community to create their best implementation of Tetris. For reference, a screenshot of the official NES version of ...