[Implementation] Pentris – Piece

Updates
  • TYPE enum: TYPE contains every possible type of piece in Tetris and Pentris. Also, a method to randomly select a type is implemented.
  • Direction enum: Direction contains four possible directions of a move.
  • Piece class: this models the data of Tetris and Pentris pieces

Piece class contains

  • Static HashMap variables that are used to contain unchangeable data (color of a piece, coordinates (shape) of a piece, and min/max points for each type)
  • x and y that record the center of a piece
  • basic methods that a piece needs
Advertisements

About Wonjohn Choi
Hello, I am a software developer Wonjohn Choi. I live in Mississauga, Ontario, Canada and study at a school called St. Francis Xavier Secondary School. My core interests include Math, Computer Science, and Engineering. Thank you.

2 Responses to [Implementation] Pentris – Piece

  1. rollends says:

    TYPE is an ambiguous name don’t you think?
    Maybe PieceType would be more appropriate.
    Though I guess it’s okay as long as you document it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: