Creating a grid layout that holds 100 buttons with 80 empty buttons and 20 random treasure buttons
问题 We are working on a Treasure Hunt game in class as a project. Below is the code that we have so far. I need to randomize where the Treasure Buttons are. My question is: Do I need to create an array that will hold EmptyButton and TreasureButton and then call Random on it or is there a way to create a random layout within the TreasureButton class? Here is our code so far public class TreasureGame { // has-a number of tries private int numberOfTriesLeft = 50; //has-a number of hidden treasure