Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tetris Game implemented using Qt
C++ Prolog
branch: master
Failed to load latest commit information.
Design Adding initial Design for Blocks and screen.
QTetris.app/Contents Built using OSX.
tasks Remove next block ui from tasks list
.gitignore Ignore moc_ generated files
Block.cpp When a row is filled empty and shift
Block.h When a row is filled empty and shift
BlockFactory.cpp Remove the x,y point param from factory
BlockFactory.h Remove the x,y point param from factory
GameBorder.cpp Increase window size and change grid position
GameBorder.h Increase window size and change grid position
GameStatsView.cpp Adding next block ui to GameStatsView
GameStatsView.h Adding next block ui to GameStatsView
GridRows.cpp When a row is filled empty and shift
GridRows.h When a row is filled empty and shift
JBlock.cpp JBlock returns blocks at row
JBlock.h JBlock returns blocks at row
LBlock.cpp LBlock returns blocks at row
LBlock.h LBlock returns blocks at row
LineBlock.cpp When a row is filled empty and shift
LineBlock.h When a row is filled empty and shift
Makefile Updating Makefile and QTetris executable
QTetris Updating Makefile and QTetris executable
QTetris.pro Integrate GameStatsView with QTetrisWindow
QTetrisWindow.cpp Integrate GameStatsView with QTetrisWindow
QTetrisWindow.h Integrate GameStatsView with QTetrisWindow
README Add License
SBlock.cpp SBlock return the blocks at a given row
SBlock.h SBlock return the blocks at a given row
SquareBlock.cpp SquareBlock returns blocks at row
SquareBlock.h SquareBlock returns blocks at row
TBlock.cpp TBlock returns blocks at a given row.
TBlock.h TBlock returns blocks at a given row.
TetrisGrid.cpp Remove references to next shape in TetrisGrid
TetrisGrid.h Remove references to next shape in TetrisGrid
TetrisScene.cpp Add ability to pause game by pressing p
TetrisScene.h Can move blocks left or right with arrow keys.
TetrisScoreKeeper.cpp TetrisScoreKeeper uses signal when score changes
TetrisScoreKeeper.h TetrisScoreKeeper uses signal when score changes
ZBlock.cpp ZBlock returns the blocks at a given row
ZBlock.h ZBlock returns the blocks at a given row
main.cpp Have the frame setup to display the Tetris grid.

README

QTetrisWindow -> holds the whole game.

TetrisGrid -> handles the blocks and game logic for tetris game.

Block -> A block to represent a tile in the game.


Game logic:

As time ticks down. A block is released from the top of the scene and it begins
to fall toward the bottom of the scene. The block can be rotated by 90 degrees by
the player to allow it to fit between other blocks. As blocks fall down the goal
is to completely fill a horizontal row of blocks. This will elimate the row, shift
all blocks above, down one. When the rows of blocks go higher than a set limit,
the game is over and you lose. If the user is able to play through a set number
of fallen blocks without going over the vertical limit, they move on to the next
level.

Ideas:

- With friends

Requirements:

* Support standard set of tetris blocks
* Filling row removes the row of blocks and moves other blocks down
* Scoring for number of rows removed
* Levels by score
* Pause game
* Show next block coming up
* Colorize blocks

## MIT License
Copyright (C) 2012 Andrew Long

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Something went wrong with that request. Please try again.