Pular para o conteúdo
Old School: Learn to Code by Building Taipan!

Old School: Learn to Code by Building Taipan!

# Old School: Complete Course Outline ## Learn to Code by Building Taipan! **Format:** 7 sections, 35 lessons **Language:** JavaScript (ES modules, vanilla — no frameworks) **Project:** Taipan! — a 1979 trading game rebuilt for the browser **Final product:** 45 source files, 243 tests, 43KB production build --- ## Prerequisites - A computer with a keyboard - A text editor (VS Code recommended — free, cross-platform) - A web browser (Chrome, Firefox, Edge — anything modern) - No prior programming experience required --- ## How Each Lesson Works Every lesson follows this structure: 1. **The Concept** — what you're learning and why it matters for the game 2. **The Game Code** — real production code, never simplified or pseudo 3. **Line-by-line Walkthrough** — every line explained 4. **Watch Out** — common mistakes, gotchas, and how to troubleshoot 5. **Check Yourself** — comprehension questions (no trick questions) **The Rule:** If you can answer the Check Yourself questions without looking back, you understood the lesson. If you can't, re-read the code section — the answers are always there. --- # SECTION 1: FIRST STEPS **Theme:** Variables, types, strings, configuration, and randomness **Goal:** Understand how JavaScript stores and names data **Game connection:** Every game is numbers changing over time — cash, debt, damage, prices. This section teaches you to work with that data. --- ## Lesson 1.1: Setting Up ### Objectives - Install Node.js and npm - Create a project with `package.json` - Configure Vite (dev server) and Vitest (test runner) - Understand the project folder structure - See the blank page that will become the game ### Key Concepts - **Node.js** — JavaScript runtime that runs outside the browser - **npm** — package manager that installs tools and libraries - **package.json** — project manifest (name, scripts, dependencies) - **Vite** — development server that auto-reloads on save - **Vitest** — test runner built for Vite projects ### Files Created ``` game_taipan/ index.html ← The one HTML page package.json ← Project config vite.config.js ← Build tool config src/ main.js ← Entry point (empty for now) ui/ styles.css ← Terminal aesthetic (empty for now) tests/ ← Test files go here ``` ### Code Covered - `package.json` — `"type": "module"`, `"scripts"`, `"devDependencies"` - `vite.config.js` — `root`, `build.outDir`, `test.globals` - `index.html` — `
`, `
Responsável Administrator
Última atualização 28/02/2026
Membros 1
  • The Browser
    10Aulas ·
    • Wiring It Together
    • Wiring It Together - Quiz
      10 xp
    • Screen Components
    • Screen Components - Quiz
      10 xp
    • Keyboard Events
    • Keyboard Events - Quiz
      10 xp
    • The DOM
    • The DOM - Quiz
      10 xp
    • HTML and CSS
    • HTML and CSS - Quiz
      10 xp
  • Patterns
    10Aulas ·
    • The Repository Pattern
    • The Repository Pattern - Quiz
      10 xp
    • The Facade Pattern
    • The Facade Pattern - Quiz
      10 xp
    • The Strategy Pattern
    • The Strategy Pattern - Quiz
      10 xp
    • The Observer Pattern
    • The Observer Pattern - Quiz
      10 xp
    • The Command Pattern
    • The Command Pattern - Quiz
      10 xp
  • Classes
    10Aulas ·
    • Factories and Composition
    • Factories and Composition - Quiz
      10 xp
    • Getters
    • Getters - Quiz
      10 xp
    • Methods
    • Methods - Quiz
      10 xp
    • Constructors
    • Constructors - Quiz
      10 xp
    • From Objects to Classes
    • From Objects to Classes - Quiz
      10 xp
  • Functions and Modules
    10Aulas ·
    • Modules
    • Modules - Quiz
      10 xp
    • Scope and Closures
    • Scope and Closures - Quiz
      10 xp
    • Arrow Functions
    • Arrow Functions - Quiz
      10 xp
    • Parameters and Return Values
    • Parameters and Return Values - Quiz
      10 xp
    • Declaring Functions
    • Declaring Functions - Quiz
      10 xp
  • Data Structures
    10Aulas ·
    • Array Methods
    • Array Methods - Quiz
      10 xp
    • Iterating Collections
    • Iterating Collections - Quiz
      10 xp
    • Nested Data
    • Nested Data - Quiz
      10 xp
    • Objects
    • Objects - Quiz
      10 xp
    • Arrays
    • Arrays - Quiz
      10 xp
  • Control Flow
    10Aulas ·
    • Loops
    • Loops - Quiz
      10 xp
    • Switch Statements
    • Switch Statements - Quiz
      10 xp
    • Logical Operators
    • Logical Operators - Quiz
      10 xp
    • Comparison Operators
    • Comparison Operators - Quiz
      10 xp
    • If and Else
    • If and Else - Quiz
      10 xp
  • First Steps
    10Aulas ·
    • Random Numbers
    • Random Numbers - Quiz
      10 xp
    • Configuration as Data
    • Configuration as Data - Quiz
      10 xp
    • Strings and Output
    • Strings and Output - Quiz
      10 xp
    • Variables and Numbers
    • Variables and Numbers - Quiz
      10 xp
    • Setting Up
    • Setting Up - Quiz
      10 xp