diff --git a/astro.config.mjs b/astro.config.mjs index 3c30fa88..0de61a45 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -181,7 +181,12 @@ export default defineConfig({ }, { label: "Activities", - link: "book/part-0-getting-started/3-building-programs/3-explore", + collapsed: true, + autogenerate: { + directory: + "book/part-0-getting-started/3-building-programs/3-explore", + collapsed: true, + }, }, ], }, diff --git a/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore.md b/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-1-hello-with-worlds.md similarity index 99% rename from src/content/docs/book/part-0-getting-started/3-building-programs/3-explore.md rename to src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-1-hello-with-worlds.md index 994e7c41..a94490a0 100644 --- a/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore.md +++ b/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-1-hello-with-worlds.md @@ -1,5 +1,5 @@ --- -title: Go Exploring +title: Hello with Worlds --- :::tip diff --git a/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-2-test-knowledge.md b/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-2-test-knowledge.md new file mode 100644 index 00000000..a2a95249 --- /dev/null +++ b/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-2-test-knowledge.md @@ -0,0 +1,8 @@ +--- +title: Test your knowledge +--- + +Having explored this leg of the journey you are now approaching a rest stop and a chance to practice and reflect. Test what you have learnt by creating one or more of the following programs: + +- [Simple Writing](/book/part-0-getting-started/3-building-programs/3-explore/3-3-classic-quote/) using the terminal. +- [Simple Drawing](/book/part-0-getting-started/3-building-programs/3-explore/3-4-paint-me/) using the Splashkit library. diff --git a/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-3-classic-quote.md b/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-3-classic-quote.md new file mode 100644 index 00000000..b43204b2 --- /dev/null +++ b/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-3-classic-quote.md @@ -0,0 +1,28 @@ +--- +title: Simple Writing +sidebar: + label: " - The Power of Words" +--- + + +Write a tiny terminal application that simply greets the user and prints the opening line of your favourite book + +```txt +Welcome to the classic-quote generator! + +“It was a bright cold day in April, and the clocks were striking thirteen.” + +``` + +Or, Level‑up by presenting the greeting inside a very simple terminal‑based user interface — think of those chunky boxes you see in retro command‑line tools. Use a classic sci‑fi computer quote for the salutation. Example shown with HAL 9000 from 2001: A Space Odyssey. + +```txt ++--------------------------------------------------+ +| | +| Good evening, Dave. I’m HAL 9000. | +| "I’m sorry, Dave. I’m afraid I can’t do that." | +| | ++--------------------------------------------------+ +``` + +Stick to the commands and concepts we’ve already covered (e.g., WriteLine / print equivalents). Avoid extra prompts or calculations—keep it truly minimal. diff --git a/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-4-paint-me.md b/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-4-paint-me.md new file mode 100644 index 00000000..eb70a592 --- /dev/null +++ b/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/3-4-paint-me.md @@ -0,0 +1,18 @@ +--- +title: Simple Drawing +sidebar: + label: " - A Picture Worth 1000 Words" +--- + + +Write/modify a Splashkit application that draws a simple picture + +![An example picture or a smiling face](./images/smile.png) + +Follow the [Graphical Hello world](/book/part-0-getting-started/3-building-programs/1-tour/2-hello-world-gui) guide +and play around with adding or removing the shapes, to see if you can make something truly original. + +:::tip +Don't worry if it seems like magic for now, with time we will decipher what all of those "magic numbers" are... +Just have a play, and enjoy being able to create shapes +::: \ No newline at end of file diff --git a/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/images/smile.png b/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/images/smile.png new file mode 100644 index 00000000..e4c1fab9 Binary files /dev/null and b/src/content/docs/book/part-0-getting-started/3-building-programs/3-explore/images/smile.png differ