Skip to content

A tetris-like game in java - with 5 instead of 4 blocks.

Notifications You must be signed in to change notification settings

lpapailiou/pentis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pentis

A game like tetris, but with five blocks instead of four per shape by default.

Table of Contents

  1. About the game
  2. Purpose of this project
  3. Project structure
  4. How to get it

About the game

screenshot of pentis

The game is purely controlled by the keyboard.

  • arrow left: moves a shape one block distance to the left
  • arrow right: moves a shape one block distance to the right
  • arrow up: rotates shape clockwise
  • arrow down: moves a shape one block distance down
  • space: drops shape to the bottom
  • p: pauses game
  • y or enter: when a game over occurs, a new game will be started by pressing these keys
  • n: when a game over occurs, the application can be left with this key
  • m: switch color mode

Every time the level increases, speed will also increase a little. The shapes are generated on the fly, so the blocks will 'cluster'. This means, that it is more likely that compact shapes appear.
If you want to get the game more annoying, you can add more blocks in the Settings class (which is located in the util package). There, also the board size (default 17x10 blocks) may be adjusted.

Purpose of this project

This project ist mainly for playing around with Java. I tried to use as basic structures as possible (e.g. using two dimensional int arrays instead of custom classes for shapes).

Project structure

  • application     this package contains the main method (in Pentis.java), and gui related code
  • logic               here most part of the game logic is in
  • util                 helper classes

How to get it

Clone the repository with:

git clone https://github.com/lpapailiou/pentis your-target-path

For further help, click here.