How to make a minesweeper in python - Python - Tutorial

preview_player
Показать описание
This is my version of minesweeper. Please forgive me on my English, i'm not american.
You should stop the video and read the code that i didn't explained to you, i wanted the video to be as short as i can.
If you want me to create a new video of this game or a video for anther game or quest, write it in the comments.
Рекомендации по теме
Комментарии
Автор

Sir yoav perez... I watched your video.... I'm wondering if you could help me with my project... we need to make a x by y table containing x by y H... it is only text-based... if we input (Q m n) we uncover mth row and nth column of the table if it has no mines... otherwise all mines should pop out.... if we input (W m n) we flag mth row and nth column of the table if it is not flagged... if it is flagged then unflag it.... if we input (E m n), the mth row and nth row should be a number with z mines around it and around it should have z numbers of flagged cells.

What can you suggest me? Thank you

jaekim
Автор

one question:
on line 146 you use a command called "mine":
is it a a command from another package? and how can i do if i want to write it without this mine command?

gianlucaferrari
Автор

Hello sir, I too had a project like that of Mr. Neil Lopez. I am currently stuck in uncovering a cell part since it would say "list index out of range". Would it be alright to show you my code and check it? Also, would you also please give me suggestions?

hellokalp
Автор

So i'm new to Pygame. I finished all the code and have no errors, and ive installed the pygame package, but when i click run nothing happens. I'm assuming this is because i dont have the pictures you do at 7:10. how do import pictures to pygame? do i just dl some and put them and put them in a directory and it will draw on them directly? if so what is the directory?

MakrosTheBlack
Автор

Please help. I am a beginner. It says that the word 'mine' is not defined. what do I do??

parret
Автор

hi ! can you help me ? when I put the size of the table when they ask me to, nothing happened :/

guiguilefrelon
Автор

Hey! Any chance you could share your source code?

Himshaw
Автор

I have followed along and at 4:13 when you check my code gives my an invalid syntax error.

samcollins
Автор

I get the error list index out of range

vlakshmikanth
Автор

Now im getting the error:

Traceback (most recent call last):
File "C:\Python27\Minesweeper\Minesweeper.py", line 281, in <module>
game(size, bombs)
File "C:\Python27\Minesweeper\Minesweeper.py", line 188, in game
w = h = len(c.board) * 40 #size of the window of the game
TypeError: object of type 'function' has no len()
>>>


can anyone help me...

MakrosTheBlack
Автор

Hello yoav, where are the images in this file, is there any place I can download them?

unseptiums
Автор

Anyone has the source code and the images

vlakshmikanth
Автор

Hi, Can you send me the updated code for this game.. it will be very helpful

apoorvgoel
Автор

Please release the source code, im getting a load of errors and I cannot work out why they are there or how they are being caused. otherwise great video!

yolkod
Автор

can you send me the final code of this video ? :D

mohamedbadawy