laengineer.blogg.se

Minesweeper java
Minesweeper java







minesweeper java

I need to create a second 2d array representation that shows which cells have been revealed.įor (row = 0 row =answersboard.length ||col answersboard. Initialized answer board: This is the board that shows what is inside each cell. The next step will be a graphical user interface. So far, I have finished the basic implementation (business logic and command line view). In order to change this I am currently working on a minesweeper clone. We are not aloud to use classes or modules outside java.lang (do not import any libraries). As I'm working with a proprietary programming language in my daily job, my java skills unfortunately missed out.

minesweeper java

I've already done the print board and the reveal cell method, I just need to make a game board and game loop to test it.

minesweeper java

Then we have to write a main game loops that incorporates both of these methods while checking to see if the player won or lost. Reveal Cell(int row, int col, Boolean game board, char answers board): Appropriately modifies the state array when a cell is to be revealed while also determining how to reveal the surrounding blank spaces according to the rules of Minesweeper. Keep in mind, that the printed board should reflect which cells have already been revealed. Print Board(char board, Boolean is Revealed): prints a Minesweeper board to screen in text form. For the first part we are suppose to make a representation of a 5x5 minesweeper board as a 2 D char array and manually add bomb locations and then update the numbers that indicate the neighboring bombs.Then we create a second representation of the board that will represent whether or not the cell has been revealed.Īfter that we need to write the following methods: Right now we are working on an end of the year project which is a text based minesweeper game using java. I'm a Comp Sci student taking intro to Comp Sci.









Minesweeper java