Question: Project 1 Instructions ( Code should be in Java language and look exactly like the output given below ) For your first Java project, you
Project Instructions Code should be in Java language and look exactly like the output given below
For your first Java project, you will make a tilematching game in the same genre as Tetris, Bejeweled, and Candy Crush To begin the game, ask the user for the numbers of rows, columns, and types of tiles.
During the game, your program must repeat the following steps:
Choose and display a tile type from among the first letters of the alphabet. For example, if there
are six tile types, each tile should be A B C D E or F selected independently at random with
an equal probability of each letter.
Display the current tile grid. The grid is initially empty. When displayed, each column is labeled
at the top starting from and separated from adjacent columns by vertical bars.
Ask the user which column to drop the current tile.
If the column is full, end the game with an appropriate message. Otherwise, place the tile in the
bottommost open space in the selected column.
If there are any sets of at least three of the same tiles in a row or column, change all tiles in all
sets to asterisks. Sets may overlap. Prompt the user for input before continuing.
Remove all asterisks from the grid and slide any tiles above those into the empty slots.
Repeat steps until no sets remain.
You do not have to validate user input. That means you may assume the user gives proper input to all
prompts for example, you may assume the numbers at the beginning of the game are all positive
integers less than
You will not be graded on efficiency. However, you will be graded on coding style, including good
variable and method names, proper indentation, sufficient comments, and following the DRY dont
repeat yourself principle.
OUTPUT SAMPLE:
Enter the number of rows:
Enter the number of columns:
Enter the number of types:
Next Tile: E
Enter the column:
Next Tile: F
E
Enter the column:
Next Tile: C
F
E
Enter the column:
Next Tile: A
F
EC
Enter the column:
Next Tile: E
FA
EC
Enter the column:
Next Tile: F
FA
EEC
Enter the column:
Next Tile: C
FFA
EEC
Enter the column:
Next Tile: A
C
FFA
EEC
Enter the column:
Next Tile: A
AC
FFA
EEC
Enter the column:
Next Tile: B
AAC
FFA
EEC
Enter the column:
Next Tile: E
B
AAC
FFA
EEC
Enter the column:
B
AAC
FFA
C
You made a set! Enter any word to continue. yay
Next Tile: D
BC
AAA
FFC
Enter the column:
Next Tile: D
BC
AAA
FFDC
Enter the column:
Next Tile: B
BDC
AAA
FFDC
Enter the column:
Next Tile: A
B
BDC
AAA
FFDC
Enter the column:
B
BDC
FFDC
You made a set! Enter any word to continue. Yay
Next Tile: A
B
BDC
FFDC
Enter the column:
Next Tile: E
BA
BDC
FFDC
Enter the column:
Next Tile: A
BA
BDEC
FFDC
Enter the column:
Next Tile: D
A
BA
BDEC
FFDC
Enter the column:
Next Tile: D
A
BDA
BDEC
FFDC
Enter the column:
