Coding Challenge #71: Minesweeper
The Coding Train The Coding Train
1.68M subscribers
524,230 views
0

 Published On May 18, 2017

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

šŸ•¹ļø p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/s...

šŸŽ„ Previous video: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #70:Ā NearestĀ Neighbo...Ā Ā 
šŸŽ„ Next video: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #72:Ā FroggerĀ -Ā PartĀ 1Ā Ā 
šŸŽ„ All videos: Ā Ā Ā ā€¢Ā CodingĀ ChallengesĀ Ā 

References:
šŸ“‘ Minesweeper on Wikipedia: https://en.wikipedia.org/wiki/Mineswe...)
šŸŒŠ Floodfill on Wikipedia: https://en.wikipedia.org/wiki/Flood_fill
šŸ± Minesweeper suggestion on GitHub: https://github.com/CodingTrain/Rainbo...

Videos:
šŸŽ„ Prototypes in JavaScript: Ā Ā Ā ā€¢Ā 9.19:Ā PrototypesĀ inĀ JavascriptĀ -Ā p5.j...Ā Ā 
šŸŽ„ Inheritance with Prototype in JS: Ā Ā Ā ā€¢Ā 9.20:Ā LookĀ away!Ā InheritanceĀ withĀ Pro...Ā Ā 
šŸ”“ Coding Train Live 92: Ā Ā Ā ā€¢Ā LiveĀ StreamĀ #92:Ā MinesweeperĀ Ā 

Related Coding Challenges:
šŸš‚ #3 The Snake Game: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #3:Ā TheĀ SnakeĀ GameĀ Ā 
šŸš‚ #46 Asteroids: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #46.1:Ā AsteroidsĀ wit...Ā Ā 
šŸš‚ #67 Pong!: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #67:Ā Pong!Ā Ā 
šŸš‚ #91 Snakes & Ladders: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #91:Ā SnakesĀ &Ā Ladder...Ā Ā 
šŸš‚ #115 Snake Game Redux: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #115:Ā SnakeĀ GameĀ ReduxĀ Ā 

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/pas...
šŸš© Suggest Topics: https://github.com/CodingTrain/Sugges...
šŸ’” GitHub: https://github.com/CodingTrain
šŸ’¬ Discord: https://thecodingtrain.com/discord
šŸ’– Membership: http://youtube.com/thecodingtrain/join
šŸ›’ Store: https://standard.tv/codingtrain
šŸ–‹ļø Twitter: Ā Ā /Ā thecodingtrainĀ Ā 
šŸ“ø Instagram: Ā Ā /Ā the.coding.trainĀ Ā 

šŸŽ„ Coding Challenges: Ā Ā Ā ā€¢Ā CodingĀ ChallengesĀ Ā 
šŸŽ„ Intro to Programming: Ā Ā Ā ā€¢Ā StartĀ learningĀ here!Ā Ā 

šŸ”— 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-o...

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

#games #prototypes #floodfill #javascript #p5js

show more

Share/Embed