Hi! I am new to this forum and I am also a beginner in Java so please go easy on me haha. I just need some ideas with this problem I'm having:
I am creating a game similar to minesweeper, but instead of mines, it has bees (beesweeper xD). I have to pass in a file to my code which contains the locations of the bees. In the file, the bee locations are written like coordinates (ex: 0 1). The file will typically have multiple coordinates for the bees (more than 1 location). I am having difficulty on how to read these values and store them in a variable. I am using a while loop which checks for .hasNextInt() and then I use .nextInt() to read each integer and store them. Since the bee coordinates have multiple integers, I obviously can't store them in a single integer variable. I was thinking of storing them in an integer array. Thoughts? (I would also like to point out that there is not a set number of bee locations - it changes depending on the file given).
Another thing: I also need the game board to update after a command that the user enters. I don't need exact code or anything, I just want some ideas for how to go about this. Would I use a for loop? If statements?
I also have another problem. I have 2 classes and I am kind of confused on how to call a class from another class? Would it be fine to call my constructor that's in class B from class A, and then run only class A?
This is my first time making a game with Java so I appreciate any help. Thank you!