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 1 Instructions ( Code should be in Java language and look exactly like the output given below)
For your first Java project, you will make a tile-matching 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 1) 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
bottom-most 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 5-6 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 25).
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 (don't
repeat yourself) principle.
OUTPUT SAMPLE:
Enter the number of rows: 5
Enter the number of columns: 4
Enter the number of types: 6
Next Tile: E
1234
|||||
|||||
|||||
|||||
|||||
Enter the column: 1
Next Tile: F
1234
|||||
|||||
|||||
|||||
|E||||
Enter the column: 1
Next Tile: C
1234
|||||
|||||
|||||
|F||||
|E||||
Enter the column: 4
Next Tile: A
1234
|||||
|||||
|||||
|F||||
|E|||C|
Enter the column: 4
Next Tile: E
1234
|||||
|||||
|||||
|F|||A|
|E|||C|
Enter the column: 2
Next Tile: F
1234
|||||
|||||
|||||
|F|||A|
|E|E||C|
Enter the column: 2
Next Tile: C
1234
|||||
|||||
|||||
|F|F||A|
|E|E||C|
Enter the column: 4
Next Tile: A
1234
|||||
|||||
||||C|
|F|F||A|
|E|E||C|
Enter the column: 2
Next Tile: A
1234
|||||
|||||
||A||C|
|F|F||A|
|E|E||C|
Enter the column: 1
Next Tile: B
1234
|||||
|||||
|A|A||C|
|F|F||A|
|E|E||C|
Enter the column: 1
Next Tile: E
1234
|||||
|B||||
|A|A||C|
|F|F||A|
|E|E||C|
Enter the column: 3
1234
|||||
|B||||
|A|A||C|
|F|F||A|
|*|*|*|C|
You made a set! Enter any word to continue. yay
Next Tile: D
1234
|||||
|||||
|B|||C|
|A|A||A|
|F|F||C|
Enter the column: 3
Next Tile: D
1234
|||||
|||||
|B|||C|
|A|A||A|
|F|F|D|C|
Enter the column: 2
Next Tile: B
1234
|||||
|||||
|B|D||C|
|A|A||A|
|F|F|D|C|
Enter the column: 1
Next Tile: A
1234
|||||
|B||||
|B|D||C|
|A|A||A|
|F|F|D|C|
Enter the column: 3
1234
|||||
|B||||
|B|D||C|
|*|*|*|*|
|F|F|D|C|
You made a set! Enter any word to continue. Yay
Next Tile: A
1234
|||||
|||||
|B||||
|B|D||C|
|F|F|D|C|
Enter the column: 4
Next Tile: E
1234
|||||
|||||
|B|||A|
|B|D||C|
|F|F|D|C|
Enter the column: 3
Next Tile: A
1234
|||||
|||||
|B|||A|
|B|D|E|C|
|F|F|D|C|
Enter the column: 4
Next Tile: D
1234
|||||
||||A|
|B|||A|
|B|D|E|C|
|F|F|D|C|
Enter the column: 2
Next Tile: D
1234
|||||
||||A|
|B|D||A|
|B|D|E|C|
|F|F|D|C|
Enter the column: 2
12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!