C# Book · Bonus Appendix
The Play‑First Prompt Modifier Cheat Sheet
Once your AI builds a working C# project — console or WPF — these prompt modifiers help you push it further. Add interaction, break the logic, transform the visuals, and expand your control board.
1. Interaction
Adding user interaction.
These prompts give your C# programs a pulse — something that reacts to the user.
-
The Input Transformer
“Modify the console program so that after each transformation, the user can type ‘again’ to re-run the same number through a new set of transformations.” -
The WPF Click Reactor
“In the WPF Chaos Equalizer, make particles spawn at the mouse position whenever the user clicks on the canvas.” -
The Keyboard Trigger
“Add keyboard shortcuts: pressing R resets all sliders to default, pressing C clears all particles, and pressing S saves a screenshot of the canvas.”
2. Breaking Logic
Breaking the physics and rules.
These modifiers push your C# logic into strange new territory.
-
The Overflow Engine
“Modify the Number Cruncher so that one of the transformations intentionally overflows an integer and prints the wrapped-around result.” -
The Recursive Spiral
“Add a transformation that recursively applies itself 5 times, each time modifying the number slightly before returning the final result.” -
The Anti‑Gravity Hack (WPF)
“Add a constant upward force to all particles so they drift toward the top of the window instead of falling or drifting randomly.”
3. Aesthetics
Aesthetic transformations.
Change the entire vibe of your WPF simulation with a single prompt.
-
The Neon Synthwave Mode
“Redesign the WPF visuals to feel like a synthwave interface: dark purple background, neon pink and cyan particles, and a faint grid overlay.” -
The Blueprint Mode
“Make the WPF canvas look like an architect’s blueprint: deep navy background, thin white particle outlines, and crisp minimal lines.” -
The Pulse Effect
“Make each particle’s radius pulse in and out using a sine wave so the entire field looks like it’s breathing.”
4. Control Board
Expanding the control board.
Add new tools, buttons, and modes to your WPF interface.
-
The Preset Button
“Add three buttons labeled ‘Calm’, ‘Normal’, and ‘Chaos’ that instantly set all sliders to predefined configurations.” -
The Color Mode Switcher
“Add a button that cycles through three color modes: Rainbow, Fire (red/orange/yellow), and Ice (cyan/white/blue).” -
The Screenshot Button
“Add a button labeled ‘Save Frame’ that captures the current WPF canvas and saves it as a PNG on the user’s Desktop.”
You reached
Bonus Appendix