Coding Challenge #71: Minesweeper

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=LFU5ZlrR21E



Game:
Duration: 53:46
509,618 views
8,092


In this challenge, I attempt to code the classic game Minesweeper in JavaScript with the p5.js library. Code: https://thecodingtrain.com/challenges/71-minesweeper

🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/-mz-ePoqd

🎥 Previous video: https://youtu.be/N8Fabn1om2k?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Next video: https://youtu.be/giXV6xErw0Y?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
📑 Minesweeper on Wikipedia: https://en.wikipedia.org/wiki/Minesweeper_(video_game)
🌊 Floodfill on Wikipedia: https://en.wikipedia.org/wiki/Flood_fill
🐱 Minesweeper suggestion on GitHub: https://github.com/CodingTrain/Rainbow-Topics/issues/164

Videos:
🎥 Prototypes in JavaScript: https://www.youtube.com/watch?v=hS_WqkyUah8
🎥 Inheritance with Prototype in JS: https://www.youtube.com/watch?v=CpmE5twq1h0
🔴 Coding Train Live 92: https://youtu.be/zxR7KfVMGqk?t=2282s

Related Coding Challenges:
🚂 #3 The Snake Game: https://youtu.be/AaGK-fj-BAM
🚂 #46 Asteroids: https://youtu.be/hacZU523FyM
🚂 #67 Pong!: https://youtu.be/IIrC5Qcb2G4
🚂 #91 Snakes & Ladders: https://youtu.be/JrRO3OnWs5s
🚂 #115 Snake Game Redux: https://youtu.be/OMoVcohRgZA

Timestamps:
0:00 Welcome!
1:26 All aboard!
2:36 Explaining the logic of the game
4:31 Defining the cells
11:03 Let's make a show() function using object protypes!
17:30 Checking if mouse is inside a grid
20:15 Revealing the cells after clicking
22:58 Checking how many bees are neighboring a particular cell
34:20 Starting to work on the game mechanic!
41:50 Let's implement floodfill!
48:45 Defining when the game is over
51:11 Minesweeper!
53:12 Thanks for watching!

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
💡 GitHub: https://github.com/CodingTrain
💬 Discord: https://thecodingtrain.com/discord
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
🖋️ Twitter: https://twitter.com/thecodingtrain
📸 Instagram: https://www.instagram.com/the.coding.train/

🎥 Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

🔗 p5.js: https://p5js.org
🔗 p5.js Web Editor: https://editor.p5js.org/
🔗 Processing: https://processing.org

📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

#games #prototypes #floodfill #javascript #p5js







Tags:
JavaScript (Programming Language)
programming
daniel shiffman
creative coding
coding challenge
tutorial
coding
challenges
coding train
the coding train
minesweeper
minesweeper coding challenge
minesweeper in javascript
minesweeper js
minesweeper p5.js
p5.js
processing javascript
beesweeper
classic game javascript
video game javascript
videogame js
minesweeper html5 canvas
simple minesweeper
video game html5
video game canvas html5
challenge
code challenge



Other Statistics

Minesweeper Statistics For The Coding Train

At present, The Coding Train has 523,892 views spread across 2 videos for Minesweeper, and about 2 hours worth of Minesweeper videos were uploaded to his channel. This is less than 0.29% of the total video content that The Coding Train has uploaded to YouTube.