Question: I have to write a program to make a match three game using an nxm matrix and it has to be written in java. I

 I have to write a program to make a match threegame using an nxm matrix and it has to be written inI have to write a program to make a match three game using an nxm matrix and it has to be written in java. I am really confused can someone please help me?

Lab 1 - Match 3 Game (500 pts) Our first lab this semester, we will write a program to make a match three game. Look around at existing matching games like Bejeweled, Candy Crush, etc. I've left some instructions to guide you through making a simple version of this highly popular game type. Start by making an nxm matrix. This means that the constructor will be in charge of determining the final size of the matrix, Fill it with the numbers 1 to p. p in this case is the difficulty of the match game. Matching only l's Z's and 3's for example would be harder than matching numbers from 1 through 9. Write helper methods to print the grind and other relevant information. Turn 1 : [1] [1] [3] [3] [2] [1] [2] [3] [2] Allow a user to swap the position of any two adjacent numbers. Write a scanner that accepts the x and y position of your target position A second input: u, d, 1, r for which neighboring cell to swap with. Make sure to ensure that it's a legal position to swap. Input : 2,2 d -> swap the cell 2,2 with the one below it. [1] [1] [3] [3] [3] [1] [2] [2] [2] Write a method to check if 3 or more adjacent spaces are the same number. This means checking both horizontal and vertical cells. Start by taking a row and checking each position going left to right. If 3 or more cells are the same make a note of this. o Record all the cells to be removed on temp matrix. Each time a player swaps the positions of two cells, call the above methods, Repeat the same type of logic checking all the values vertically in the columns. It might be helpful to make a helper methods to check horizontal matches, vertical matches. Write a method to remove all the values in the temp matrix from the original matrix. Removed Values From Original: Temp Matrix: [] [] [] [1] [1] [3] [ ] [ ] [ ] [3] [3] [1] [x] [x] [x] [] [] [] Write a method to replace all the missing values with new random numbers. For a better simulation, move all the values above the removed cells, and instead put new random values on the top. Numbers Drop Down New Random Values [][][] [2] [2] [1] //Check for more matches created [1] [1] [3] [1] [1] [3] //from new values. [3] [3] [1] [3] [3] [1] Repeat the matching, removing, and replacing until no other matches occur. . The player takes another turn and this repeats until the player earns 10 points. Record how many turns that the player took to earn 10 points. Consider adding logic to allow a player to play multiple games, recording scores of previous games. There are other strategies you may employ to solve this match / removal program, feel free to use logic that is most intuitive to you. Do be mindful not to make the following mistake: [1] [1] [1] [] [] [] [1] [2] [1] [1] [2] [1] //Notice you don't want to miss [1] [3] [2] [1] [3] [2] //the numbers in red. When complete: Double check to make sure your code is formatted nicely. Make sure program is well written. Ensure there are comments. Document your program in an additional pdf or word document. Detail in this document any extra efforts you wish to be considered for extra credit. The extra credit ceiling for this project is 100% Submit only.java files. Submit a screen shot of you winning the game and your score

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!