Skip to content

Add AP CSP Pseudocode Robot Runner & Tilemap System#1207

Merged
jm1021 merged 7 commits into
Open-Coding-Society:mainfrom
RudraBJoshi:main
May 20, 2026
Merged

Add AP CSP Pseudocode Robot Runner & Tilemap System#1207
jm1021 merged 7 commits into
Open-Coding-Society:mainfrom
RudraBJoshi:main

Conversation

@RudraBJoshi
Copy link
Copy Markdown
Contributor

@RudraBJoshi RudraBJoshi commented May 18, 2026

Summary

  • Adds a visual 7×7 grid robot executor to the pseudocode code runner, implementing College Board AP CSP robot commands (MOVE_FORWARD, ROTATE_LEFT, ROTATE_RIGHT, CAN_MOVE)
  • Adds a tilemap library (25 hand-designed navigable mazes) loaded via from tilemaps import N
  • Adds spawn character at (col, row), spawn goal at (col, row), and RENDER(matrix) commands for full scene control
  • Canvas-based step-by-step animation with Catppuccin-styled grid rendering
  • Fixes pseudocode syntax highlighter (broken curly-quote string delimiters, comment colour override)
  • Adds keyword reference guide and tilemap directory to the AP CSP Pseudocode Runner notebook with collapsible dropdowns

New files

  • assets/js/pages/runners/executors/Pseudosystem_Executors/RobotExecutor.js — robot simulation, canvas renderer, frame-based animator
  • assets/js/pages/runners/executors/Pseudosystem_Executors/PseudocodeExecutor.js — moved here, exports compile for reuse
  • assets/js/pages/runners/tilemaps/index.js — 25 navigable 7×7 tilemaps

Test plan

  • Select Pseudocode mode in any code runner — syntax highlighting works (keywords orange, builtins teal, comments gray)
  • Run from tilemaps import 8 + spawn character at (1,1) + movement commands — grid renders and animates
  • spawn goal at (col, row) renders a star that turns green when reached
  • RENDER(myMap) with a custom 7×7 list-of-lists swaps the grid at runtime
  • Hitting a wall shows robot turning red with an error message
  • Output box expands to fit the full canvas without clipping
  • Keyword reference dropdown and tilemap directory on the pseudocode runner page are collapsed by default

@jm1021 jm1021 merged commit 9ebfaa0 into Open-Coding-Society:main May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants