Head-First-JavaScript-Programming
Head-First-JavaScript-Programming copied to clipboard
The code used in battleship game has a very serious bug using which a person can win the game even by getting his one HIT correct. For example if the...
Hi all, I just started with JavaScript by reading this book. So far so good :) But I stuck on the thingamajig code. I cannot exactly understand how the code...
I am trying to hard code the ships and try to hit and sunk them, but the message that Ships were either, hit, or sunk, or were missed is not...
Hi, I'm on chapter 8 where you build a battleship game. I have finished the Viewer and Model part without the Controller part. My problem: I type in the console...
For anyone interested: This code based on previous lessons from this excellent book will also work for this Event Handler exercise. It uses the setAttribute( x, y) method instead of...
Hello, Why is a function needed under the unlock function? The following doesn't work... why doesn't it? Game.prototype.unlock = function() { if (this.level === 42) { console.log(this.name + " is...
I have a question about [this](https://github.com/bethrobson/Head-First-JavaScript-Programming/blob/master/chapter8/battleship.js) Battleship code in Chapter 8. We have the model, view, controller objects; however, some functions, like helper function `parseGuess()` and handler functions, like `handleKeyPress`...
I'm a teacher who assigned Head First JavaScript Programming to a student learning JavaScript. He completed the book, and ended up with a working version of the battleship game. Now...
https://github.com/bethrobson/Head-First-JavaScript-Programming/commit/a420adfdda305aae3531fa83feb96c611f294754 https://github.com/bethrobson/Head-First-JavaScript-Programming/commit/aa56cd3f54770b271415ac7ad1e0ec0d874999ec
I cannot find the resources for rock.png and related images, nor the cookies.js ready bake javascript. Do these exist anywhere?