تخطي للذهاب إلى المحتوى

الدورات

كافة الدورات

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` — `

`, `

نظرة عامة

لا توجد لوحة صدارة في الوقت الحالي :(

عوامل التصفية