

I feel really dumb for not being able to do something as basic as this but this was the best I was able to come up with! I sort of got it to print the number of rows / columns but i have no idea how to make it look "normal" or fill it in. It does one and only one thing which would be making a movie or Minesweeper and other games, which are all made for one. Create a m x n minesweeper game where each cell is a bomb with probability p. Pass the code through pycodestyle and correct everything it reports. These helpfully often disappear naturally when using OO. Some obvious classes for a Minesweeper game would include for example Game, Board and Tile. In this post, we’re going to discuss how to make a very simple. Rows = int(input("Please enter a number: "))Ĭolumns = int(input("Please enter a number: "))Īnd this is what it outputs: Please choose the number of rows: minesweeper.py -import stdio import stdarray import sys import random Accept integers m and n, and float p as command-line arguments. A few superficial things: Games like this are perfect for object oriented code. You can read a ton of tutorials, for example, and still not understand how to make a game in Python, or how to build a web app.

I am trying to create a board that lets users choose the number of rows and columns but I can't seem to put anything together!įor example if a user wants 3 rows and 3 columns I am trying to make it print out: xxx
