These files are in-class projects and homework of a course — "AI-Assisted Programming".
The main target of this course is to build complete projects with the support of a Large Language Model (LLM), regardless of whether the programmer is familiar with the specific coding language. Learning how to communicate with an LLM effectively — known as prompt engineering — is therefore a core skill.
The structure of each project is generated by ChatGPT 4o or ChatGPT 3.5 through prompt engineering. After the LLM produces the bulk of the code, the programmer reviews and fine-tunes the output to complete the project.
Programmers do not need to write much code; we only need to read, understand, and guide the logic produced by the LLM.
Course period: 2024.9 – 2024.12
Some files in this repository (including exam questions, assignment specifications, and course materials) are created by or belong to the course professor. They are included here solely for educational reference. Please respect the intellectual property of the original authors and do not redistribute these materials without permission.
Tech: HTML, JavaScript
A web-based cannon siege game. The player sets two parameters — angle (0–90°) and power (10–100) — to fire a cannonball at a distant castle. The cannonball follows a realistic projectile arc affected by gravity. If the cannonball misses the castle and hits the terrain (hill), it creates a crater, gradually deforming the landscape. The goal is to hit and destroy the castle.
asking.txt— the prompt used to generate the gamegame_final.html— the finished playable game
Tech: HTML, JavaScript, Cohere Chat API
A web-based chatbot powered by the Cohere API. Key features include:
-
Math plugin: When the chatbot detects a math problem, it uses JavaScript's
eval()to solve it and displays a[>_]button showing the computation steps. -
Conversation dictionary: Remembers variable assignments across the conversation (e.g.,
let a = 2+3, then asksa * 3→ answers15). -
asking.txt— the prompt history used to develop the chatbot -
window.html/window.js— the main chatbot interface and logic -
key.html— API key configuration page
Tech: HTML, JavaScript, Cohere API
A feature-rich ChatGPT-style web application with a polished UI and multiple functional modes. Features include:
-
Edit — re-edit any previous prompt and get a fresh response
-
History — view all historical versions of a prompt's conversation
-
Code plugin (
[>_]) — when asked to write Python code, displays a plugin button; clicking it runs the code or shows it in a popup window -
Copy / Run code — buttons to copy or execute generated Python code
-
Various icon-based UI controls (SPEAK, LISTEN, THINK, VIEW, REDO, EDIT)
-
asking.txt— the full prompt engineering history -
CheapGPT.html— the main application file -
ReadMe.docx/ReadMe.pdf— additional documentation provided with this project -
Various
.pngfiles — UI button icons
Tech: Python, Terminal UI (Unicode), Networking (socket)
A two-player online chess game played entirely in the terminal, connected over a local network via a server-client architecture.
Features:
-
Full chess rules including legal move validation, piece capture, and pawn special moves
-
Colour-coded cursor (Blue = select mode, Green = move mode, Yellow = illegal move)
-
Blinking cursor implemented with terminal escape codes
-
Unicode chess piece rendering on a coloured board
-
Final version supports mouse-based piece selection in a Pygame GUI with networked play
-
asking.txt/asking2.txt/asking3.txt— the full iterative prompt history -
chessNoConnect.py— single-machine offline version -
final/server.py+final/client.py— networked online game -
final/share.py— shared game logic -
final/chcp 65001.txt— terminal encoding note
Tech: Python (Pillow / GIF generation)
A Python program that reads six custom colors from a sidecolor.txt file and generates an animated .gif of a 3D-rendered cube that rotates continuously. The animation demonstrates four rotation styles: balanced, above, one-corner, and pirouette.
sidecolor.txt— defines the six face colors of the cubeCreateRotationCube.py— the Python programrotating_cube.gif— the generated animated output
Tech: Python, Pygame
An interactive 3D Rubik's Cube game rendered with Pygame. The cube is composed of smaller cube objects, each with coloured faces.
Controls:
-
Normal mode: Hold left-click and drag to rotate the entire cube. Hover over the center cell of a face to highlight it; click to enter rotation mode.
-
Rotation mode: Left-click rotates the selected face −90°; right-click rotates +90°;
ESCcancels. -
Asking.txt/Asking_before.txt— the prompt history -
cube.py/cube2.py/cube3.py— iterative versions of the cube implementation -
RubicCube.jpeg— reference image used in prompting
Tech: Python, Pygame
A Pac-Man clone built with Pygame. Includes:
-
A maze with pellets and walls
-
A player character (Pac-Man) with sprite images
-
Multiple ghost enemies with individual AI behaviour
-
Score tracking and lives system
-
pacman.py— main game entry point -
Player.py— player class -
Ghost.py— ghost class -
initialization.py— screen/grid setup -
pacman.png,pacman2.png,ghost*.png— game sprites
Tech: HTML, JavaScript
A classic Space Invader-style web game. Features include:
-
Player spaceship moves left/right with arrow keys; press
Zto fire (hold for continuous fire) -
Grid of alien enemies that move in sync and fire back randomly
-
Destructible barriers between the player and enemies (pixel-level damage)
-
Player starts with 10 lives; game ends when lives reach 0 or all aliens are defeated
-
asking.txt— the prompt used to build the game -
final/game.html+final/game.js— the finished playable game -
temp/— intermediate development versions
Contains exam materials for the course. Copyright belongs to the course professor.
Tech: Python (Pillow)
A poker card game. The program generates five random playing cards as an image, lets the player discard and redraw cards, and then evaluates and displays the final hand (e.g., Straight Flush, Full House, Two Pair, etc.).
card.py/card_final.py— the card generation and game logicasking.txt— the prompt used to generate this project
Tech: HTML, JavaScript, Node.js, Cohere API
A full-featured chatbot web application (similar to CheapGPT) with:
-
Edit and History buttons for each user prompt
-
Python code plugin (
[>_]) — generates, runs, and displays Python code -
Copy code and Run code buttons
-
Backend powered by Node.js (
server.js) -
B113040045.html— the main chatbot page -
B113040045_ProblemSolved.html— a revised/debugged version -
server.js— the Node.js backend server -
asking.txt— the prompt used to build this application
| Technology | Projects |
|---|---|
| HTML + JavaScript | BombShooting, ChatBot, CheapGPT, SpcaeInvater, EXAM (Final) |
| Python + Pygame | MagicCubic, PacMan |
| Python + Pillow | CreateRotationCube, EXAM (Midterm) |
| Python + Sockets | chess |
| Node.js | EXAM (Final) |
| Cohere API | ChatBot, CheapGPT, EXAM (Final) |
Each project folder is self-contained. General instructions:
- HTML/JavaScript projects (
BombShooting,ChatBot,CheapGPT,SpcaeInvater): Open the.htmlfile in a web browser. Projects using the Cohere API require a valid API key. - Python/Pygame projects (
MagicCubic,PacMan): Install dependencies withpip install pygame, then run the main.pyfile. - Python/Pillow projects (
CreateRotationCube, EXAM Midterm): Install withpip install Pillow, then run the.pyfile. - chess (online): Run
server.pyon one machine andclient.pyon the other, ensuring both are on the same network. - EXAM Final (Node.js backend): Run
node server.js, then open the HTML file in a browser.
Course: AI-Assisted Programming | 2024.9 – 2024.12 This ReadMe file is made by copilot AI agent