Following is the implementation of Minesweeper. JavaFX sample of a 4x4 grid of charts which, on click, explode to fill the grid and implode to return their original position. Positions in the grid are modified by entering their coordinates where the first coordinate is horizontal in the grid and the second vertical. Methods to handle each event of the game. There is an n by m grid that has a random number (between 10 to 20 of the total number of tiles, though older implementations may use 20.60 instead) of randomly placed mines that need to be found. MyBoard (back-end to configure number counts of each cell, etc. There was a problem preparing your codespace, please try again. The GUI is a simple program so extra functionalities like chording, timing or any other features commonly found. Real Board(buttons for the user to click). Contribute to syohex/java-simple-mine-sweeper development by creating an account on GitHub. It uses the MVC (Model-View-Controller) design. Or, is there a better way to do the same task? In the context that, to make an already clicked cell unclickable again, I just disabled it. Note : I'm just in high school so please excuse any 'dumb' ways I may have coded certain segments.Īny tips or books on how to improve the general quality of the code, or any information that will help me become better are deeply appreciated.Īpart from feedback, I would also like to know how to preserve colours in buttons which I have disabled. Recursion is supposed to simplify your code, make it smaller and easier at the expense of more memory use. I created a Java Swing Minesweeper, for which I would like some feedback. Sorry for being blunt, but your code is plain crazy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |