- Alright so let's take a look at my solution.…Now it wasn't enough for me to solve the 8 Queens problem.…That's been done a lot of times.…And as a matter of fact, like other authors,…I'm drawing inspiration from a previous solution.…But I wanted to show you how…to build an interface around this…and also use an SVG graphic…in order to display the solutions.…The SVG graphic has the added advantage…of being responsive so that no matter what size I make this,…it's gonna adjust to the size of the device,…which is pretty cool.…
Now technically the SVG graphic starts out…with all of the queens in place…and each queen has a transparent color.…You can see the SVG starts right here.…It's embedded into my index.html file…which is built with Bootstrap.…So you can see here that it gets an id of Board…and then inside we see all the different pieces…every one of these groups right here are squares…and this id refers to the number of the box right here.…So this would be A1 over here on the right-hand side.…
This will be B1 right here.…
Visit other courses in the series to see how to solve the exact same challenges in languages like C++, C#, Java, PHP, Python, R, Ruby, and Swift.
Skill Level Intermediate
1. Problem One - Exploring Lake Pend Oreille
2. Problem Two: Image Analysis
3. Problem Three: Eight Queens
4. Problem Four: Accessing Peripherals
5. Problem 5 - Recursion and Directories
6. Problem 6 - Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.