CMSC132 Summer 2018

Project: Teris Game

Due Date: Jun 15 June 16, 2018 11:59 pm
Assignment Type: Closed (See Policy)

Overview

For this project you will implement code for a game named Teris game. Tetris is a tile-matching puzzle game. There are seven tetrominos as shown in the table

Tetromino/
Piece
Shape Color
I Cyan
J



Blue
L Orange
O Yellow
S Green
T Purple
Z Red

A random sequence of Tetrominos fall down the playing field (a rectangular vertical shaft, called the "well" or "matrix"). The goal of the game is to manipulate these Tetrominos, by moving each one sideways by pressing the left/right arrow keys and rotating it to left by 90 degree units by pressing the z key, with the aim of filling the gaps horizontally. When a tetromino is moved, the destination cells must be all clear. When a line is filled, it gets destroyed, and any block above the deleted line will fall. The game ends when the stack of Tetrominos reaches the top of the playing field and no new Tetrominos are able to enter. Read Tetris Game for more details.

Size of the well: 22 rows and 10 columns. Your program should work with different wells size.

Rotation Rules:

Tetromino will rotate 90 degree to left when you press the letter z on your keyboard. Here is the rotation diagram.

Name Initial (Up) Rotate Left (Left) Rotate Left (Down) Rotate Left (Right) Rotate Left (Up Again)
I
T
O
L
J
S
Z

 

We will provide the graphical user interface (GUI) and you need to develop the code that implements the rules of the game. A video illustrating the game can be found at Game Video. Keep in mind that you should not debug your code using the GUI (student tests are preferable).

Objectives

This project will allow you practice two-dimensional arrays, abstract classes, inheritance, and test development.

Grading

Code Distribution

The project's code distribution is available by checking out the project named TetrisGame. The code distribution provides you with the following:

Specifications

You are expected to implement methods for the Tetromino and I, J, L, O, S, Z, T classes. The other classes have been provided and you should not modify them. You should familiarize yourself with the Tetris class.

Notice you are not required to write student tests for credit, however, if you need assistance during office hours you need to bring student tests that illustrates the problem you are experiencing. Also, keep in mind the percentage associated with release tests is high, so you need to test your project thoroughly.

 

Requirements

Suggestions on How To Start the Project

Submission

Submit your project using the "Submit Project" option (available by right clicking on the project folder).

Academic Integrity

Please make sure you read the academic integrity section of the syllabus so you understand what is permissible in our programming projects. We want to remind you that we check your project against other students' projects and any case of academic dishonesty will be referred to the Office of Student Conduct.