Question: Write me a code in the java langauge and the only instance varibale is: 'private char [ ] [ ] grid; ' public void applyGravity
Write me a code in the java langauge and the only instance varibale is: 'private char grid;
public void applyGravity
This method simulates a simple step for gravity pulling tiles down by replacing
each EMPTY cell in grid with the one above it and setting the one above to
EMPTY It starts at the bottom row of grid and processes up to the top. Note:
this replacement cannot happen for the top row of grid since there is not a row
above the top row.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
