Record Class GameControls.Point
java.lang.Object
java.lang.Record
edu.uw.tcss.model.GameControls.Point
- Record Components:
x- a singular x coordinate on the Tetris game board.y- a singular y coordinate on the Tetris game board.
- Enclosing interface:
GameControls
Data class that represents a "point" on the Tetris game board. Positive x
moves right across "columns" of
Block objects. Positive y
moves up "rows" of Block objects.- Version:
- Autumn 25
- Author:
- Charles Bryan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Constructor Details
-
Point
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
x
-
y
-