From the course: Code Clinic: JavaScript
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Preparing the board - JavaScript Tutorial
From the course: Code Clinic: JavaScript
Preparing the board
- [Instructor] All right, so here's what we're starting with in this project. We've got a completely empty script.js file, and we have an index, that HTML page, that's essentially just a simple bootstrap document with this really big SVG graphic on it. Now there are a couple of things in here, like the text, that's gonna have the solution number, that is not part of the SVG graphic, but everything else is just contained in this SVG section. So you can see that there's actually a text section that is all an SVG graphic that we are going to control with some code. So to begin with, I'm gonna set up all the variables, and also make sure that we can click some of these graphics on and off. So these little queens that are gonna be in these different boxes are gonna need to be turned on, and actually let me show you that. We actually have each queen right now in each one of the rectangles, it's just that they all have a fill of transparent, so we have to turn them on by changing their fill,…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Intro: Eight queens1m 45s
-
(Locked)
Solution overview1m 31s
-
(Locked)
Preparing the board6m 46s
-
(Locked)
Setting up the board4m 17s
-
(Locked)
Computing solutions3m 56s
-
(Locked)
Finishing calculations7m 23s
-
(Locked)
Storing board solutions4m 1s
-
(Locked)
Display solutions4m 7s
-
(Locked)
Navigating through solutions3m 32s
-
(Locked)
-
-
-