Тёмный
No video :(

Can I Code Minesweeper in One Hour? 

Tech With Tim
Подписаться 1,6 млн
Просмотров 95 тыс.
50% 1

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 151   
@TechWithTim
@TechWithTim 2 года назад
What should I challenge myself to code next? Let me know!
@ssenthilnathan3
@ssenthilnathan3 2 года назад
Monkey Type Clone !!!
@mr.whiteboard6357
@mr.whiteboard6357 2 года назад
You should make an algebraic equation solver GUI.
@UnderfundedScientist
@UnderfundedScientist 2 года назад
Snake in an hour
@bhartiwadhwa9241
@bhartiwadhwa9241 2 года назад
Ludo in 2 hour
@charsetUTF-8
@charsetUTF-8 2 года назад
AI Caro in an hour!
@matt-xq1xv
@matt-xq1xv 2 года назад
Not only does he teach you how to code. He teaches basic theory and how to break down problems like a programmer. Tim, this is why you're at the top bro. Great video.
@JanBrugg
@JanBrugg 2 года назад
Tim, just as a side note: I think the positions of the bombs are determined after your first click, since your first click should always uncover a safe field
@TechWithTim
@TechWithTim 2 года назад
Good note! I am clearly not a very experienced minesweeper player lol
@dalevanderzee4086
@dalevanderzee4086 2 года назад
In original minesweeper, it is possible on first click to click on a bomb, so keeping with tradition I would say code your bombs before your first click
@kenhaley4
@kenhaley4 2 года назад
I agree with Dale--it is possible to click on a bomp at the get-go. Also, I don't think the original minesweeper has a limit on the number of flags.
@candyxxv5834
@candyxxv5834 2 года назад
@@dalevanderzee4086 bruh I’m coding a full minesweeper for a school project and I spent like hours trying to have the board fill after the first click…
@craigbates178
@craigbates178 2 года назад
Would love to see this seen through final debug, optimization, adding animation, etc.
@nikitabronx5728
@nikitabronx5728 2 года назад
Thanks, Tim. I started to learn Python a week ago. You're motivating me!
@fustigate8933
@fustigate8933 2 года назад
Thanks for the tutorials Tim, the pygame videos were also very exciting!
@krishnans2006
@krishnans2006 2 года назад
I really enjoyed this - watching you code a real project and following your journey was really cool! This reminds me of those old 12-hour livestreams you used to do - would definitely love to see more of these types of videos!
@Nevim469
@Nevim469 2 года назад
Had lot of fun watching this video, looking forward for more videos like this! :)
@andrewanastasiades6819
@andrewanastasiades6819 2 года назад
Tim you are an amazing coder and a terrible mine sweeper XD thanks for the vid!
@devangkhatri4772
@devangkhatri4772 2 года назад
Would really love to see the continuation video tim , big up for this much progress though!
@ilikelamps1126
@ilikelamps1126 2 года назад
The video idea reminds me of The Coding Train! Keep up the great work.
@bibekbasnet3750
@bibekbasnet3750 2 года назад
Thank you Tim ! I am following your programming expert course and so far I am loving it ! I really hope to build crazy stuffs like you using python someday
@mrlax3946
@mrlax3946 2 года назад
Great work Tim! definitely wrap up this project and I'd say explain a bit about how you implemented DFS algorithm to expand when you click as I believe that the most challenging part of the project is implementing that correctly.
@St0rytell3r
@St0rytell3r 2 года назад
Love it. Minesweeper is such a fun coding challenge. Sudoku, wordle, solitaire, they're all great ways to mess around and develop. Keep doing what you're doing. -Stan
@tomborjigen2284
@tomborjigen2284 6 месяцев назад
I love whenever Tim goes "WOW"
@karthikp6266
@karthikp6266 2 года назад
This kinda videos are motivating us and inspiring us to learn coding 🤩, thank u bro 👍
@tcgvsocg1458
@tcgvsocg1458 2 года назад
i really like the..."ok maybe more difficult game that hard that its look..." THE BEST RU-vidR EVER !!!!thx a lot tim
@jessicabidon9903
@jessicabidon9903 2 года назад
The adjacent tiles should only be revealed if you click a tile with 0 adjacent mines (or if you double click a revealed tile). So the uncover function can be done really simply with recursion, by adding a check if the field value is 0 and then uncovering that tile's neighbors.
@starsky51
@starsky51 2 года назад
I really enjoyed this - great format! It feels like one of the six hour marathon videos but with a more structured approach. I also like Tim's coding style - I often get stuck trying to make ugly concise code. Tim videos remind me to keep my code readable!
@MrMattie725
@MrMattie725 2 года назад
I love how you can code Minesweeper but are really bad at the game itself :D (And that's putting it mildly)
@TechWithTim
@TechWithTim 2 года назад
Haha agreed. I never really played it.
@starblockstudios
@starblockstudios 2 года назад
Anybody else realise that when he replaced all "MINES" with "BOMBS" at 34:50 he changed the window caption to "BOMBSweeper"? Lol, great video though
@gokaytaspnar1355
@gokaytaspnar1355 2 года назад
Lol
@Tcrunz
@Tcrunz 2 года назад
Thanks for the vid! Maybe a fun sequel to these would be to show us how you would refactor it into perfectly polished, distributable code?
@pravachanpatra4012
@pravachanpatra4012 2 года назад
Tim can make a social media clone, chat app, Pygame golf game, etc
@godwinsojan6205
@godwinsojan6205 2 года назад
good idea
@gavin4056
@gavin4056 6 месяцев назад
I made a minesweeper game for my ap computer science class in highschool, still one of my most memorable projects. It definetly took longer than an hour though lol.
@igon388
@igon388 2 года назад
Lol the bug right at the end, I wondered if that would ever show itself. Also the ability to just flag uncovered tiles and recover them was pretty funny I thought
@ianyourgod
@ianyourgod 2 года назад
I've been trying to learn object oriented programming in python, and this is really fun to watch!
@seaphor665
@seaphor665 2 года назад
Yes, please complete this video, and then do a video of how you would do it correctly if you had more time.
@bloodaikanswalke
@bloodaikanswalke Год назад
Very awesome tutorial, though I WOULD have wished if you were able to finish the challenge in another video, if possible. I know this is an old video, but it would still be awesome. My own opinion.
@chrisdanny5180
@chrisdanny5180 2 года назад
Your talent is something else
@nkish
@nkish 2 года назад
When playing the game at 56:35, you are forgetting the numbers represent the number of bombs in adjacent cells _including on the diagonal_!
@tcgvsocg1458
@tcgvsocg1458 2 года назад
thx a lot tim for this huge thx to you continue
@nikos4677
@nikos4677 2 года назад
omg i learned how to play mine sweaper yesterday and this video was uploaded yesterday
@MuhammadAbidSiddique
@MuhammadAbidSiddique 2 года назад
This is a great tutorial. Can you please break it down for beginners? If possible.
@ameerhamzakhan8054
@ameerhamzakhan8054 2 года назад
It would be awesome if you could code a 8 puzzle or 15 puzzle game next
@davifraga1290
@davifraga1290 2 года назад
where is the github of this project?
@mikoajkahl9451
@mikoajkahl9451 2 года назад
Great video but you really have to practice playing minesweeper haha !
@Zellaaaaaaaaaaa
@Zellaaaaaaaaaaa 2 года назад
Nice video!
@teprox7690
@teprox7690 Год назад
when are this live coding challenges will come back ?
@duyha2454
@duyha2454 Год назад
Thank you
@Grigoriy457
@Grigoriy457 2 года назад
Hi Tim! What plugin did you use (32:10)?
@karamkassem9821
@karamkassem9821 2 года назад
I was searching for this comment
@karamkassem9821
@karamkassem9821 2 года назад
I found it , it is called Grepper
@Grigoriy457
@Grigoriy457 2 года назад
​@@karamkassem9821 Thank you
@victorsamuelalojadoyuricha1775
@victorsamuelalojadoyuricha1775 10 месяцев назад
are you interested in making a no guessing mode for minesweeper?
@brandsmp
@brandsmp 2 года назад
Please create a top down shooter game in pygame, a classic arcade game
@lavycube3521
@lavycube3521 2 года назад
An idea for another coding challenge - Bulls And Cows game + solver.
@Xlore127
@Xlore127 2 года назад
I get invalid color argument when using "white" or "black" as definitions and have to use the RGB values. How are you able to just use the word?
@marcrindermann9482
@marcrindermann9482 2 года назад
it would have been useful to know how the game is played :D anyway, nice video
@unknownman5296
@unknownman5296 2 года назад
Please make more video like this
@malong159
@malong159 2 года назад
i would like to see the full game programimg
@diegonti
@diegonti 2 года назад
Which autocompleater does he use?
@JanBrugg
@JanBrugg 2 года назад
tabnine
@PerfectmindAMV
@PerfectmindAMV 2 года назад
how to make web 3.0 website in python 🙂
@davidardo4466
@davidardo4466 2 года назад
Is mathematics important in programming or not? Can you do better when math is bad Please answer me
@codingcassowary6391
@codingcassowary6391 2 года назад
What a great project and tutorial! I believe that more often than not people learn so much more from a project like this, especially when they can see it being developed from scratch so they can follow along on a second screen, than by reading some formal book on how to code. 💻 >>> 📖
@Fabik11
@Fabik11 2 года назад
Do it in java next time. Great video overall!
@natyacodes
@natyacodes 2 года назад
tim will heart this :>
@aayushrajbhar1029
@aayushrajbhar1029 2 года назад
First view 😉
@UnderfundedScientist
@UnderfundedScientist 2 года назад
Legendary
@brookestephen
@brookestephen 3 дня назад
set board boundaries and max bombs randomize the placement of bombs, append to a list of the form ["row.col"] - ensure same board square is only used once determine the bomb counts touching each board square , save in a separate dictionary of the form ["row.col", count] set the board & squares, naming each square in the form "row.col", setting each image to BLANK set right click and left click event listeners for each board square wait for user input: LEFT CLICK - if no touching bombs, expand selection until board boundaries and until first square touching bombs using recursion! - if selection is a bomb, you LOSE! RIGHT CLICK - keep flags and ? in separate lists of the form ["row.col"] - if board square BLANK, set image to FLAG, and if all bombs have been flagged, you WIN! - if board square FLAG, set image to ? - if board square ?, set image to BLANK
@JRom_19
@JRom_19 2 года назад
I'm attempting to follow along with what you're doing in this video but when trying to just run the blank window, as you do around 6 minutes into the video, I get an error saying: pygame.error: video system not initialized Any help with this would be appreciated. I've been looking online for a solution but havent been able to fix this exact issue. Thanks
@TechWithTim
@TechWithTim 2 года назад
Type Pygame.init() right after u import it
@JRom_19
@JRom_19 2 года назад
@@TechWithTim It's in there. I have the first two lines of code 1 import pygame 2 pygame.init()
@JRom_19
@JRom_19 2 года назад
@@TechWithTim I fixed it. Just started over and it worked the second time. I must have just had some other error in the syntax somewhere else. Thanks, Tim! love the content as usual.
@rusov1040
@rusov1040 Год назад
Sometimes on my first click bombs are being uncovered. Does anyone have a solution? (Great video BTW :))
@taloan9699
@taloan9699 2 года назад
13:45 hmmm... i wonder what you were about to type subconsciously...
@purplemosasaurus5987
@purplemosasaurus5987 2 года назад
How is Tabnine guessing the majority of lines of your code?
@RajveerSingh-rk9bg
@RajveerSingh-rk9bg 2 года назад
please make a zombie hunter game
@godwinsojan6205
@godwinsojan6205 2 года назад
this is a good stuff 😀. can you make a course about unity game engine plz it help me a lot
@potatohater5599
@potatohater5599 2 года назад
watching him try to play is infuriating but otherwise grate tutorial haha
@MrTheoTugboat
@MrTheoTugboat 2 года назад
I liked this.
@uberwass
@uberwass 2 года назад
How about Jezzball
@hotlemonadesauce2042
@hotlemonadesauce2042 2 года назад
Hey tim, what would you suggest web dev with django or web dev in the classic method?
@johannes8144
@johannes8144 2 года назад
First you should get your basics done (html, css, js) then write something with an external api and get a feel for it, then you could start outsourcing your logic to your backend. Which could be something like django.
@JelloTalks
@JelloTalks 2 года назад
Bro codes minesweeper in an hour, while I take an hour to center a div
@apfelmuse3426
@apfelmuse3426 2 года назад
Hi Tim, what auto completion are you using?
@vask5500
@vask5500 2 года назад
I think kite or tabnine
@sazzadrahman2189
@sazzadrahman2189 2 года назад
Make a bot which replies in facebook messenger with some quick replies or buttons.
@MinhTechie
@MinhTechie 2 года назад
Hi Tim, I wonder if I can feature my channel on yours. I can make some videos about really cool animations in React Native 😉
@thirtyvirus7731
@thirtyvirus7731 2 года назад
Its gray in us and everywhere else its grey. WEIRD. Thats probably why you forget xd
@SkyFly19853
@SkyFly19853 2 года назад
That's so cool... ✅✅✅✅✅✅
@SkyFly19853
@SkyFly19853 2 года назад
@J Hemphill Oh... I didn't know about emoji part...
@autobot1281
@autobot1281 2 года назад
Tim I am stuck with the basics of python Please help me please please thank you so much
@johannes8144
@johannes8144 2 года назад
First program your own tic-tac-toe game, in the console. That should not be too hard, then refactor your code using more functions, less nesting etc. and maybe try programm paradigms like OOP. If you finished it, you could start implementing an algorithm to play against you, or you could focus on design, and implement it in pygame with a GUI. If you finished that, you could try to build an even more complex game, like connectFour or Monopoly, stick to your things that worked on your tic-tac-toe game, and you will get it done. Some tips: At all cost separate your IO from your logic → implement functions to read from the console and don't do it in your main logic code. Send a person your code on discord servers and ask for feedback. And most importantly keep focused, and don't spend your time watching RU-vid videos, of people programming, get YOUR hands dirty. Hope it helps, GL :)
@AriehAnkri
@AriehAnkri 2 года назад
You can use event.key, event.pos, event.button instead of pygame.key.get_pressed() it is more clear that is from the specific event
@dylancaldwell8337
@dylancaldwell8337 2 года назад
You could speed run tic tac toe against another player or computer, and give yourself like 30 minutes to do it?
@lichtkoni
@lichtkoni 2 года назад
For the algorithm
@Snorlena
@Snorlena 2 года назад
My Python skill is like your mines skill lol.
@Haza3137
@Haza3137 2 года назад
lol
@eazyaviation
@eazyaviation 2 года назад
epuic
@chikkii1601
@chikkii1601 2 года назад
First comment 🥳🥳🥳🥳🥳🥳🥳
@OBlTO-02-10
@OBlTO-02-10 2 года назад
#
@olwenyemmanuel2838
@olwenyemmanuel2838 2 года назад
institution management system
@rubixrj7074
@rubixrj7074 2 года назад
Too many magic numbers - can tell when you are adding comments to if lines.
@mitjakomi2
@mitjakomi2 2 года назад
second
@inspisiavideos8542
@inspisiavideos8542 2 года назад
Hi! Please teach email preferences center templates for a contact page. I recently lost a job opportunity to work making html templates. I look for templates over youtube but couldn’t find one they like
@enderduck4253
@enderduck4253 2 года назад
a) not entirely sure what you're asking for. b) if you aren't even able to change things in tutorials to suit your needs, which is pretty basic, then you aren't really learning. This applies not just to coding but to everything. You're not learning anything at that point, you're just mindlessly copying someone else's work. Reevaluate your learning methods and make changes, even if it makes it more challenging for you. And try to stop relying on tutorials by using documentation instead.
@artemon121
@artemon121 2 года назад
Нихуя не понятно, но очень интересно
@guybrush3000
@guybrush3000 2 года назад
WHY ARE YOU SO BAD AT SEEING DIAGONALS? Never been more frustrated at watching someone play minesweeper
@rami_atallah
@rami_atallah 2 года назад
Nice try
@lumiere4460
@lumiere4460 Год назад
Nice coding, but you do not know anything about Minesweeper.
@rexbhargav6427
@rexbhargav6427 2 года назад
pagal bna rhe hai ye
@dittery
@dittery 2 года назад
i kind of feel like python is really cheaty cuz you can just use all these libraries like pygame and turtle to lay the groundwork for you instead of actually having to understand how it works
@nogr3369
@nogr3369 2 года назад
No need to reinvent the wheel.
@dittery
@dittery 2 года назад
@@nogr3369 i get you, but im wondering: do other languages like C++, java, javascript, etc. have these kinds of libraries? you can literally make a game so easily with python because all the dirty work is already done for you by turtle and pygame, do such tools exist for other languages? if they do, then I guess its not so bad. Im moreso worried about this because I want my experience with python to carry over to new languages hwen I eventually move on to them
@nogr3369
@nogr3369 2 года назад
@@dittery I understand the concern, and it is important to understand how things work instead of just blindly using them. The problem is, sometimes those things are really complex and would take a lot of time to understand and implement on your own, making it incredibly time consuming to complete any project. Thus, libraries are a common thing in pretty much every single programming language from Python to C and the good ones will have documentation you can use to get a better understanding of how the code works.
@thewelder3538
@thewelder3538 2 года назад
Wow, this is a terrible way of coding a minesweeper game. Also, I wouldn't do this as a 2D array, that's like the childish thinking way. The array should be flat.
@TechWithTim
@TechWithTim 2 года назад
How would you represent it as a flat array? I’m curious what your method would be consisting you are far superior to me.
@thewelder3538
@thewelder3538 2 года назад
@@TechWithTim Not superior, but I have been coding games at well known software house for, eerrm, wow, nearly 13yrs now. And yes, I am OLD. Okay, flat array... You think of a 2D array like it has an X and a Y coordinate, but that's not how it actually is. A 2D array is layed out contiguously in memory, or at least it is in C++, not sure how the Python interpreter does it. So let's say you have an 8x8 2D array... Like say, a[8][8]. What would happen if you did, and I'm not sure what the syntax is for Python, but a[8] = 1. This should be equivalent to a[1][0] = 1. So you don't treat your array like it has two dimensions, but has a contiguous length of 64. Do you see where I'm going with this?
@thewelder3538
@thewelder3538 2 года назад
@J Hemphill I nearly died laughing at your comment. Although I have to be careful when laughing, since the company I work for was responsible for a very public lootbox controversy.
@nite5963
@nite5963 2 года назад
Uncover_from_pos would’ve been good to be recursive, you just need to make sure you don’t need to uncover an already uncovered tile
@cristiangonzalez140
@cristiangonzalez140 2 года назад
Start_time should be time.time()
Далее
Pygame in 90 Minutes - For Beginners
1:35:22
Просмотров 1 млн
Coding Challenge #71: Minesweeper
53:46
Просмотров 528 тыс.
I Made Minesweeper with just Redstone!
17:39
Просмотров 229 тыс.
Make Pong With Python!
1:12:42
Просмотров 115 тыс.
Harder Drive: Hard drives we didn't want or need
36:47
Learn Python With This ONE Project!
55:04
Просмотров 1,7 млн
3 Mini Python Projects - For Intermediates
1:25:15
Просмотров 161 тыс.
Minesweeper Opening Strategy: The Classical
11:51
Просмотров 247 тыс.