resources_for_connectfour
Connect 4
Make a class called Piece
with the following instance variables:
- color (use a import java.awt.Color)
- row
- column
A Connect4 Piece is either Color.RED
or Color.BLACK
Make a Constructor with three parameters in the same order listed above
Make the following methods:
- setColor
- getColor
- setRow
- getRow
- setCol
- getCol
- setLocation(int row, int col)
- toString
- equals(Piece other) which returns true if the other Piece is the same Color
Add this class in a Java Project with the following classes:
resources_for_connectfour.txt · Last modified: 2022/05/10 18:23 by frchris