YoVDO

Build Minesweeper with JavaScript

Offered By: Traversy Media via YouTube

Tags

Javascript Courses Computer Science Courses Game Development Courses HTML Courses Recursion Courses Event Handling Courses

Course Description

Overview

Learn to create the classic Minesweeper game using vanilla JavaScript in this 48-minute tutorial. Explore recursion concepts and implement game functionality step-by-step. Begin with HTML setup and CSS grid styling, then dive into JavaScript DOM manipulation. Master techniques like creating the game board, adding numbers, checking square contents, implementing recursive neighbor checks, and handling user interactions. Develop skills in using methods such as createElement(), appendChild(), getAttribute(), and setTimeout(). By the end, gain the ability to build a fully functional Minesweeper game, complete with flag placement and win condition checks.

Syllabus

- Brad's Intro.
- Ania's Intro.
- Recursion explainer.
- Setting up our HTML.
- Styling our Grid in CSS.
- Setting up our JavaScript usng the DOM EventListener.
- Creating our Board using .createElement() and .appendChild().
- Adding numbers to the board using Modulus and .contains().
- Checking what is under a Square usng .getAttribute() .innerHTML and .add().
- Checking neighbouring squares using recursion and setTimeout.
- Adding flags to squares with a left click.
- Checking for wins.


Taught by

Traversy Media

Related Courses

Web Development
Udacity
Programming Languages
University of Virginia via Udacity
Building a Basic Website
University of Massachusetts Amherst via Independent
Web-Technologien
openHPI
iDESWEB, Introducción al desarrollo web
Miríadax