Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi I'm in a level 2 programming class and this is one of the labs we have to do in BLuejay but I don't understand
Hi I'm in a level 2 programming class and this is one of the labs we have to do in BLuejay but I don't understand it. I don't think this is advance because we are only in the second programming class so can someone help me!
i need the code written out!
well in class we use Bluejay but if i can copy and paste it then you can do any or ill re-write it on my computer!
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 1's 2'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] [2] [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, lr 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] [21 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. Temp Matrix: Removed Values From Original: UUU [1] [1] [3] UN [3] [3] [1] [x] [x] [x] UUU 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 UNO [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] U [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 progra 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started