


This game application is a clone of the original Minesweeper, it is a logic puzzle video game genre generally play for PC. The application contains multiple interactive function that will make this game playable. This is a user-friendly kind of application that is free to be modified. The Simple Minesweeper Game was developed using JavaScript programming language. Coding Tool used: Notepad++ or any text editor that can run html files.I need to create a second 2d array representation that shows which cells have been revealed.įor (row = 0 row =answersboard.length ||col answersboard.Simple Minesweeper Game in JavaScript Free Source Code Basic Information Initialized answer board: This is the board that shows what is inside each cell. We are not aloud to use classes or modules outside java.lang (do not import any libraries). 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. 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.
