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` — `
`, `
| ज़िम्मेदार | Administrator |
|---|---|
| आखिरी बार अपडेट | 28/02/2026 |
| सदस्य | 1 |
-
The Browser10Lessons ·
-
Wiring It Together
-
Wiring It Together - Quiz10 xp
-
Screen Components
-
Screen Components - Quiz10 xp
-
Keyboard Events
-
Keyboard Events - Quiz10 xp
-
The DOM
-
The DOM - Quiz10 xp
-
HTML and CSS
-
HTML and CSS - Quiz10 xp
-
-
Patterns10Lessons ·
-
The Repository Pattern
-
The Repository Pattern - Quiz10 xp
-
The Facade Pattern
-
The Facade Pattern - Quiz10 xp
-
The Strategy Pattern
-
The Strategy Pattern - Quiz10 xp
-
The Observer Pattern
-
The Observer Pattern - Quiz10 xp
-
The Command Pattern
-
The Command Pattern - Quiz10 xp
-
-
Classes10Lessons ·
-
Factories and Composition
-
Factories and Composition - Quiz10 xp
-
Getters
-
Getters - Quiz10 xp
-
Methods
-
Methods - Quiz10 xp
-
Constructors
-
Constructors - Quiz10 xp
-
From Objects to Classes
-
From Objects to Classes - Quiz10 xp
-
-
Functions and Modules10Lessons ·
-
Modules
-
Modules - Quiz10 xp
-
Scope and Closures
-
Scope and Closures - Quiz10 xp
-
Arrow Functions
-
Arrow Functions - Quiz10 xp
-
Parameters and Return Values
-
Parameters and Return Values - Quiz10 xp
-
Declaring Functions
-
Declaring Functions - Quiz10 xp
-
-
Data Structures10Lessons ·
-
Array Methods
-
Array Methods - Quiz10 xp
-
Iterating Collections
-
Iterating Collections - Quiz10 xp
-
Nested Data
-
Nested Data - Quiz10 xp
-
Objects
-
Objects - Quiz10 xp
-
Arrays
-
Arrays - Quiz10 xp
-
-
Control Flow10Lessons ·
-
Loops
-
Loops - Quiz10 xp
-
Switch Statements
-
Switch Statements - Quiz10 xp
-
Logical Operators
-
Logical Operators - Quiz10 xp
-
Comparison Operators
-
Comparison Operators - Quiz10 xp
-
If and Else
-
If and Else - Quiz10 xp
-
-
First Steps10Lessons ·
-
Random Numbers
-
Random Numbers - Quiz10 xp
-
Configuration as Data
-
Configuration as Data - Quiz10 xp
-
Strings and Output
-
Strings and Output - Quiz10 xp
-
Variables and Numbers
-
Variables and Numbers - Quiz10 xp
-
Setting Up
-
Setting Up - Quiz10 xp
-