Questions tagged [tetris]

Block matching game created by Alexey Pajitnov . Elements are 4-segmented pieces where the name of the game comes (tetra is numerical prefix in Greek used for 4).

Tiles are 4-segmented pieces which also provided the name of the game (tetra the Greek numerical prefix for the number 4). More on Wikipedia

285 questions
0
votes
1 answer

Colission testing with numpy

Let's say I have a cell-matrix and coordinates x, y which denote the top-left cell of a Tetronimo and a Matrix B corresponding to a Tetris well: T = [[2,2,2], [2,0,0], [0,0,0]] y,x = (1,0) B = [[0,0,0,0,0], [0,0,0,0,0], …
Sven
  • 2,839
  • 7
  • 33
  • 53
0
votes
0 answers

C++ Rotating Tetris Pieces

In my program I am making the game Tetris! How could I rotate my char array piece? I know how to get the key syncs and everything. I could make each piece already rotated in the char, but is their an easier way? Here is my char array I'd use. char…
0
votes
2 answers

Tetris Game array issue

So I'm trying to make a Tetris game and I've come across something odd that I'm unsure about. I have an array called bottom which stores the value of the lowest block - so, if there is no block in the first column, "bottom" will be 20. If there's a…
0
votes
1 answer

How to get pixels of char C++

I'm making Tetris game , and while displaying shapes on console i faced a problem; at first just displaying the shapes were all shifted to the left ignoring the space so i made a condition to move the cursor with the space so as to display the…
0
votes
1 answer

When I draw rectangles in a JPanel, not all of them display. Why do some rectangles in the first column not display?

Right now, I'm working on making a version of Tetris. To test out my Graphics class, I'm first trying to draw 200 gray squares (10x20) before I worry about drawing the piece. I have two 2D arrays called myRectangles (which has coordinates, height,…
0
votes
2 answers

Tetris Shape Generation Algorithm in Java

I'm building a Tetris game in Java using some software design patterns. Basically, I created a factory algorithm that retrieves a string to figure out what type of tetris object to make when it's given a request by the main game loop, see…
Arsalan Khalid
  • 246
  • 1
  • 4
  • 15
0
votes
0 answers

What could cause a game loop to crash at a random time?

I'm working on a project where I'm writing the game Tetris to be played in a browser using Javascript. I'm having a problem where the game simply stops working. It doesn't give any error messages. It's as if the game pauses itself after a random…
user3047641
  • 149
  • 1
  • 2
  • 12
0
votes
1 answer

Tetris rotation C++

I am coding Tetris in Qt C++ at the moment. The game is almost completed and the only thing I need to add is the rotation. Now what I am struggling with, is the theory behind the rotation. Tetris has 7 different kind of stones ( I, S, Z, L, J, T, O…
FrontMobe
  • 186
  • 1
  • 13
0
votes
0 answers

Understanding Java code for Tetris

First off, just so we are completely clear, I took too classes on java a year ago. I have the fundamentals, but am pretty rusty. I tried to code Tetris on my own, but got stuck for a few days so I decided to look up a tutorial. I checked out the…
FlipFlopSquid
  • 99
  • 1
  • 4
  • 11
0
votes
0 answers

Pygame Array Assignment Bug

I'm working on a tetris clone and everything is practically done but I've encountered a bug that I have no idea how to fix. I have spent several days on it to no avail. What happens is that after playing for a while a piece will land and fill up all…
T-Fox
  • 1
  • 3
0
votes
1 answer

Make a Start page to my game Java

I've been working on a version of a Tetris game and I tried to make a start page. I figured working with 2 panels will do fine but once I press the button the game doesn't run. Here is a piece of the code, where I implemented the panels. Any ideas…
Lorena Sfăt
  • 215
  • 2
  • 7
  • 18
0
votes
2 answers

Responsive Tetris board in pure HTML/CSS

I'm trying to make a tetris board in html. I want to light the block each time you over it. So I made two div (1 block), the first div lights the two of them but I'm not able to make the second one light the first one. How can I make it work ? CSS…
0
votes
4 answers

tetris rotation

For university we're supposed to write a game (the language is modula2 little chance you know it). Each tetromino is defined through a central piece and 3 relative pieces, Now when it comes to rotation i just rotate the relative blocks (linear…
Samuel
  • 1
  • 1
  • 1
0
votes
1 answer

Java libGDX Creating multiple objects (Tetris game)

I thought it would be cool to use libGDX to make a Tetris clone. I figured out pretty quickly how to make a falling block and maintain it inside the screen. My next challenge is to "spawn" a new block as soon as the current block has landed. I…
Sociopaten
  • 144
  • 1
  • 9
0
votes
1 answer

Moving numbers in richTextBox in C#

I need to solve behavior of four numbers, which will move down or rotate as the meaning of the game Tetris. This is that I want to do on richTextBox in C#, but my code is still not working good. I want to do as illustrated below. How can I do to…