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

NullPointer Exception in Java tetris game

Hello I am relatively new to java and I am writing a tetris style program. I am currently getting a nullpointerException like this : Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at…
Caleb Sayers
  • 21
  • 1
  • 6
0
votes
1 answer

My square tetrimino keeps rotating oddly, but my other tetrimonos rotate fine?

So in my tetris game, I'm working on rotation. I've found an algorithim that works for every piece but the square piece (ironically, the only one that doesn't even need to rotate). I know I could just check to see if the piece isn't a square then…
jburn7
  • 125
  • 2
  • 3
  • 15
0
votes
1 answer

Move Current Piece in JS Tetris

I'm having trouble grabbing the current piece as I program tetris. Right now, when I try to move one tetromino, all of them move. I've been stuck on this problem for a while, and I'd really appreciate some help. Below is a snippet of the code, and I…
aveevu
  • 767
  • 6
  • 15
0
votes
4 answers

Can Tetris be made without using XNA currently? Using C#?

I have an outdated computer, that currently will not run certain XNA components. I am a beginner at this stuff, so I'm looking to get some other programming stuff done before I get a new computer that can run XNA and everything else. But is Tetris…
Geno
  • 101
  • 1
  • 4
0
votes
0 answers

Visual Basic .Net is changing my variables for me, and throwing errors in my program

I am a Grade 11 IPT (programming) student from Australia. I have an assignment in which I need to make an old-style game. I chose to make tetris and am almost finished, but have a few issues. I am having issues with Visual Basic .Net (2008). The…
0
votes
1 answer

How to shift 2d array elements down in C

I am trying to shift the contents of a 2d array down when implementing Tetris in C. This is to move the blocks down. The code works but its not moving elements once only, See the image for the problem(The number in the top left corner is the random…
Crckr Hckr
  • 11
  • 1
  • 2
0
votes
1 answer

Tetris in GridWorld won't compile

I have an AP Computer Science assignment to make Tetris using GridWorld. I have to make 4 classes, TetrisBug, TetrisGame, TetrisBlock, and TetrisBlockO. Here are the codes in that order: TetrisBug.java import info.gridworld.actor.*; import…
BMK600
  • 19
  • 1
  • 8
0
votes
1 answer

My KeyListener doesn't respond to my JPanel

I'm writing a Tetris game and most of my mechanism is done. I tried to input my keyboard interaction creating a new KeyListener, but it simply doesn't seem to work, as I press the buttons the pieces just keep falling instead of changing their…
Rono
  • 115
  • 5
0
votes
3 answers

GUI for Tetris program is malfunctioning

I am working on a Tetris program. I am reusing a perfectly functioning Tron program to make it. In the Tron program, the GUI worked perfectly, but in the Tetris program I cannot get any GUI window to pop up not even the grid. I also need another…
GrimThor3
  • 171
  • 1
  • 10
0
votes
1 answer

Creating the Tetris shapes in Java as classes extending Area or Shape

I am working on writing the Tetris game myself using Java. I am not using any tutorials already containing the code, because I want to try to decompose it myself and see how far I can take it. So far, not so good. I have stumbled upon the creation…
iulikia
  • 115
  • 1
  • 6
0
votes
0 answers

Changing the view - Tetris Game - MVC

I'm trying to make Tetris in JAVA with MVC. Now, I wrote everything and it all works fine. I only have one problem left; changing the views. When I get a score of 200, for example, the view has to change. I want to change the squares to circles in…
0
votes
1 answer

C Tetris, Place Block

So I am working on a Tetris game as a school project in C. I got a little problem with the following situation. In Tetris when one completes a horizontal row, the row should be deleted and everything above the row should move down one place.The…
user3177617
  • 103
  • 6
0
votes
1 answer

Python Tetris Rotation Check

I'm trying to create a rotation program for Tetris that I am coding in python. The rotation part works correctly but I have the problem of blocks rotating off the screen or into other blocks. What I have tried to create is a function that will make…
Dan G.
  • 982
  • 1
  • 8
  • 20
0
votes
1 answer

making tetris in vba

Sub left() Dim m As Integer Dim n As Integer For m = 0 To 3 For n = 0 To 3 If j < 3 Then GoTo end End If If board(m + i - 1, n + j) = 1 Then If board(i + m - 1, j + n - 1) = 2 Then GoTo end End If …
0
votes
1 answer

JavaScript: How do I stack rectangle elements tetris style, without using plugins?

I'm making a scheduling calendar. The events are horizontal blocks (Google Cal has vertical ones). And because I have loads of events in one date I want the events to stack onto eachother without wasting any space, like this: I did find…
krivar
  • 342
  • 1
  • 3
  • 16