![]() ![]() The total number of mines to be found is shown at the beginning of the game. ![]() The top left of the grid is position 1,1 the bottom right is at n,m. Positions in the grid are modified by entering their coordinates where the first coordinate is horizontal in the grid and the second vertical. 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. As an inexperienced programmer, I wrote the whole program in a single file, when it should have obviously been modular.You are encouraged to solve this task according to the task description, using any language you may know. Developing the powerups took another 30 or so hours. You could then go into a 1-in-2 chance without risk, and the game felt a lot less random.ĭeveloping the vanilla game took about 10-15 hours. So I added an ability (that required charging up) to "diffuse" a bomb. After testing this for several runs, I realized that the game felt too "random" at times when you had a blind choice between two blocks. After creating the basic minesweeper game, I decided to make it a little different from vanilla, so I added an ability to detect a bomb at a random location on the minefield. Once that was working properly, I moved on to create the GUI version. I created the basic algorithm to create the minefield and place bombs, then used fprintf() heavily to create a text-based user interface. Since I had never created a game before, I decided to do a text based version first. ![]() My program was so much more advanced than everyone else's, the TA (teaching assistant) thought that I'd copied it off the internet! Not surprising, since some students presented code that literally used just 2 to 3 functions to plot a graph (plot is a built-in function in Matlab). The objective of the course was to create a Matlab program (no restriction on the type of program) that would demonstrate the student's understanding of the language. I had learnt to program only a couple of months ago in my Matlab course at college (Engineering Major). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |