I have a problem writing a Java Method.
That’s the situation:
There is a Matrix (number of rows and cols will be given via scanner). In this Matrix every point is a Rock. Now we exchange one random Rock with a bottle of Coke with some Mentos in it and we want to find out which rock will get wet.
The Parameter:
- Every Rock gets wet as long as it is not hidden behind another Rock in vertical, diagonal or horizontal direction. For example:
(D = Dry, W = Wet Rock, B = Bottle)
- 0 1 2 3
0 W W W W
1 W B W D
2 W W W W
3 W D W D
Now, how do I implement the isWet() method?
New contributor
Johann is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.