In this challenge, I attempt to code the classic game Minesweeper in JavaScript with the p5.js library. Code: thecodingtrain.com/challenges...
🕹️ p5.js Web Editor Sketch: editor.p5js.org/codingtrain/s...
🎥 Previous video: • Coding Challenge #70: ...
🎥 Next video: • Coding Challenge #72: ...
🎥 All videos: • Coding Challenges
References:
📑 Minesweeper on Wikipedia: en.wikipedia.org/wiki/Mineswe...)
🌊 Floodfill on Wikipedia: en.wikipedia.org/wiki/Flood_fill
🐱 Minesweeper suggestion on GitHub: github.com/CodingTrain/Rainbo...
Videos:
🎥 Prototypes in JavaScript: • 9.19: Prototypes in Ja...
🎥 Inheritance with Prototype in JS: • 9.20: Look away! Inher...
🔴 Coding Train Live 92: • Live Stream #92: Mines...
Related Coding Challenges:
🚂 #3 The Snake Game: • Coding Challenge #3: T...
🚂 #46 Asteroids: • Coding Challenge #46.1...
🚂 #67 Pong!: • Coding Challenge #67: ...
🚂 #91 Snakes & Ladders: • Coding Challenge #91: ...
🚂 #115 Snake Game Redux: • Coding Challenge #115:...
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: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/guides/pas...
🚩 Suggest Topics: github.com/CodingTrain/Sugges...
💡 GitHub: github.com/CodingTrain
💬 Discord: thecodingtrain.com/discord
💖 Membership: kzitem.infojoin
🛒 Store: standard.tv/codingtrain
🖋️ Twitter: / thecodingtrain
📸 Instagram: / the.coding.train
🎥 Coding Challenges: • Coding Challenges
🎥 Intro to Programming: • Start learning here!
🔗 p5.js: p5js.org
🔗 p5.js Web Editor: editor.p5js.org/
🔗 Processing: processing.org
📄 Code of Conduct: github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...
#games #prototypes #floodfill #javascript #p5js
Негізгі бет Coding Challenge #71: Minesweeper
Пікірлер: 529