Vamos utilizar o seguinte livro incluindo os diferentes materiais de apoio que o acompanham (ver mais abaixo):
"Head First - Javascript programming" (2014)
Acesso direto à folha de cálculo: docs.google.com/spreadsheets/d/1sFaRCA2VhPv5ScoN9OXn42qUhVqltt83FP0CtcXIVF4/edit
1. The way JavaScript works 2
2. How you’re going to write JavaScript 3
3. How to get JavaScript into your page 4
4. JavaScript, you’ve come a long way baby... 6
5. How to make a statement 10
6. Variables and values 11
7. Back away from that keyboard! 12
8. Express yourself 15
9. Doing things more than once 17
10. How the while loop works 18
11. Making decisions with JavaScript 22
12. And, when you need to make LOTS of decisions 23
13. Reach out and communicate with your user 25
14. A closer look at console.log 27
15. Opening the console 28
16. Coding a Serious JavaScript Application 29
17. How do I add code to my page? (let me count the ways) 32
18. We’re going to have to separate you two 33
19. Bullet points 37
1. Let’s build a Battleship game 44
2. Our first attempt... 44
3. First, a high-level design 45
4. Working through the Pseudocode 47
5. Oh, before we go any further, don’t forget the HTML! 49
6. Writing the Simple Battleship code 50
7. Now let’s write the game logic 51
8. Step One: setting up the loop, getting some input 52
9. How prompt works 53
10. Checking the user’s guess 54
11. So, do we have a hit? 56
12. Adding the hit detection code 57
13. Provide some post-game analysis 58
14. And that completes the logic! 60
15. Doing a little Quality Assurance 61
16. Can we talk about your verbosity... 65
17. Finishing the Simple Battleship game 66
18. How to assign random locations 67
19. The world-famous recipe for generating a random number 67
20. Back to do a little more QA 69
21. Congrats on your first true JavaScript program, and a short word about reusing code 71
Na seguinte página vamos desenvolver o fluxograma e o pseudo-código do jogo da Batalha Naval, retirado do capitulo 2, secção 6, "Writing the Simple Battleship code" (pág. 50): sites.aebenfica.org/apontamentos-tic/programacao/javascriptbatalhanaval
Livro: "Head First - Javascript programming" (2014) (acesso reservado ao utilizadores do domínio)