- Active Github account
- Copilot license that has been shared with you is already linked to your account
- Wifi is connected, internet is working
If you do not have any of the above, pair up with someone that does have everything working.
Activities | Duration |
---|---|
Gather, grab coffee, pair up & set up | 10 mins |
Learn about Copilot | 5 mins |
Explain Assignment | 5 mins |
Code! | 45 mins |
Demos & group discussion | 15 mins |
To get started, enter by clicking the button below. This will create a GitHub Codespace that you can work in. Once it loads select the Create codespace button.
Deep within the enchanted Forest of Algora, two mystical creatures, the Lox and the Drako, perform a sacred dance every millennium. This dance is not just for celebration but is a ritual to bring balance to the forest.
Your task is to simulate the dance between Lox and Drako. Each creature has its own set of dance moves, and the combination of moves creates various magical effects in the forest. Your goal is to determine the state of the forest after the dance is complete.
- Each creature can perform one of these dance moves:
Twirl
,Leap
, orSpin
. - Combination of moves from both creatures result in magical effects:
- Twirl + Twirl = Fireflies light up the forest.
- Leap + Spin = Gentle rain starts falling.
- Spin + Leap = A rainbow appears in the sky.
- Other combinations create different effects that you can dream up.
- Each effect will change the state of the forest.
- Some effects can be beneficial, while others can be detrimental.
- The dance consists of 5 sequences.
- You need to display the state of the forest after each sequence.
Moves for Lox (Creature 1)
Sequence 1 | Sequence 2 | Sequence 3 | Sequence 4 | Sequence 5 |
---|---|---|---|---|
Twirl | Leap | Spin | Twirl | Leap |
Moves for Drako (Creature 2)
Sequence 1 | Sequence 2 | Sequence 3 | Sequence 4 | Sequence 5 |
---|---|---|---|---|
Spin | Twirl | Leap | Leap | Spin |
- Implement a system that allows users to add new characters, dance moves and effects.
- Users can select the dance move for each sequence.
- Implement speech-to-text for selecting dance moves using Azure Speech Services.
- Visualize the forest using Azure AI DALLE-3.
- Animate visualizations if the above is not challenging enough.
- Use GitHub Copilot and write the simulation in any language you'd like.
- Focus on clear and concise code that handles the dance dynamics efficiently. Ask GitHub Copilot/Chat, "How can I make this code more readable and maintainable?".
- Creating a visual representation for the dance and effects is optional but encouraged if you have time.
- Use a console application to render the output.
- Initialize the state of the forest.
- Each creature selects a dance move for each sequence.
- Determine the effect of the combined dance moves on the forest.
- Update the state of the forest after each sequence.
- Display the final state of the forest after the dance is complete.
- If you're using a GitHub Codespace, you're ready to go!
- If running locally, ensure that you have your target language/framework installed.
- Create a folder for your code.
- JavaScript: Create a folder called
algora
and add a file namedapp.js
. - Python: Create a folder called
algora
and add a file namedapp.py
. - C#: Create a folder called
algora
and rundotnet new console
.
- JavaScript: Create a folder called
See if you can use Copilot to find out the complexity (BigO notation) of the code.
-
Open the GitHub Copilot Chat view in the sidebar if it's not already open. Make sure your solution file is still open as well.
-
Ask Copilot Chat what the complexity of the code is.
-
Ask Copilot Chat to make the code more efficient.
-
Ask for the complexity again - is it better?
-
Highlight all of the code with Ctrl/Cmd+A.
-
Press Ctrl/Cmd+I to open the inline chat.
-
Type "/doc"
-
Ask Copilot Chat to document the function.
-
Open GitHub Copilot Chat in the sidebar.
-
Type "/simplify" and press Enter. You can also add any text you want after the "/simplify" to give Copilot more instructions.
-
What did Copilot Chat suggest you do to make it simpler?
Copilot Chat can help with that too! Just copy the error message and paste it into Chat. Often that's all Copilot needs to resolve your issue.
Read Your Copilot Adventure description, the high-Level tasks to perform, and the GitHub Copilot hints to help you write your code.
- Use GitHub Copilot and/or GitHub Copilot Chat to help you write the code for the adventure. You can use any language you'd like. Try learning a new language if you're up for the challenge (more on that below)!
- Leave any comments in your code to explain your thought process and show prompts that GitHub Copilot used to help you out.
If you'd like to share your solution with others, perform the following steps:
- Publish your adventure solution to a GitHub repo.
- Visit https://github.com/snw55/CopilotAdventures/issues and select
New Issue
. - Add a link to your GitHub repo in the body section.
- If you have any feedback, share what you found (good or bad). We'd love to hear your feedback!
- Try and only use your Codespace and Copilot
- Questions or stuck? Ask us!
- Example solutions can be found in
/Solutions
folder - Copilot shortcuts
CTRL
-SHIFT
-I
: Workspace promptCTRL
-I
: Inline prompt, also works on code selection.
- Copilot commands
- /doc /explain /fix /generate /help /optimize /simplify /tests
- Azure Speech: key/region
- Azure AI DALLE-3: endpoint/key