Skip to content

Java command line tetris program - ascii art interface

Notifications You must be signed in to change notification settings

damn1/ascii-tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

# ascii-tetris
A Java implementation of the Tetris game I made as a Java lecture for the highschool I teach in.
It has simplified rules (for now): pieces are moved by user and they're not falling to the ground as in real tetris.
Pieces are randomly generated, dimension of the field is up to the user. 
The program will be completed with the possibility to save the match on a text file and then restart from it.
It has an ascii art interface:
  ┌──────────────────────────┐  
 *│┌────────────────────────┐│* 	Player		dmn
 *││    D4MN T E T R I S    ││* 
 *│├────────────────────────┤│* 	Score		0
 *││ . .██ . . . . . . . . .││* 
 *││ .████ . . . . . . . . .││* 	Blocks		0
 *││ .██ . . . . . . . . . .││* 
 *││ . . . . . . . . . . . .││* 			 . .██
 *││ . . . . . . . . . . . .││* 	Next		 . .██
 *││ . . . . . . . . . . . .││* 			 . .██
 *││ . . . . . . . . . . . .││* 
 *││ . . . . . . . . . . . .││* 	
 *││ . . . . . . . . . . . .││* 
 *││ . . . . . . . . . . . .││* 
 *││ . . . . . . . . . . . .││* 
 *││ . . . . . . . . . . . .││* 
──┴┴────────────────────────┴┴──
////////////////////////////////
Fai la tua mossa: ← (a), ↑ (w), ↓ (s), → (d), ↺ (k), ↻ (l), ferma (o), esci (X). 

The aim of the excercise, is to:
 - understand differences between global/local variables
 - understand how to write and use methods, managing inputs and outputs and undertanding the difference between parameter passing by copy/reference
 - improve the ability to write algorithms
 - learn to create personalized exceptions and understand how to throw and catch them
 
Since the definition of types is not part of the scheduled program, this is a single class application. Moreover it does not include use of dynamic structures (list...).

About

Java command line tetris program - ascii art interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages