This repository contains a worked solution to the 2021-2022 coursework for the Application Programming module. View the "Core capabilities" section of this document to see the requirements we need to satisfy.
-
Search for "Git GUI" and "Node.js" in AppsAnywhere and launch them.
-
Launch an editor from AppsAnywhere (e.g., "Visual Studio Code" or "Atom").
-
If you are a newcomer to Git, you could also search for and launch "Github Desktop Client".
-
Install an editor (e.g., Visual Studio Code or Atom).
-
If you are new to GitHub, also install GitHub Desktop or GitHub client.
- Nothing! If you have access to codespaces, you should see a new tab once you click on the green "Code" button. Just click on the "Open in Codespaces" button and follow the instructions on the README.md file in every branch.
Don't download this repository as a zip file. Instead, follow the instructions below to clone this repository (copy it) on your machine.
You can clone the repository using any of the following tools:
Open the shell (Terminal on Linux/Mac or Command Prompt/PowerShell in Windows) and run:
git clone https://github.com/portsoc/hangman-in-branches.git
Run the following in a shell:
gh repo clone portsoc/hangman-in-branches
While this repository is open in the browser, click the green "Code" button and then "Open with GitHub Desktop".
- Open Visual Studio Code and click on the "Source Control" icon on the left-hand sidebar.
- Click on the "Clone Repository" button in the opened panel.
- Paste the link to this repository (
https://github.com/portsoc/hangman-in-branches
) in the dialog box and press Enter. - Select a location on your computer to save the repository.
- Now click "Open" to view the cloned repository in Visual Studio Code.
For more information view this instruction on how to clone a repository in Visual Studio Code.
This project is built in stages. For simplicity, we have made a branch for each stage (but be aware that this is not a conventional use of branches).
Here is the link to all the branches on GitHub:
- Intro (current branch)
- 0: Variables
- 1: Functions
- 2: NPM
- 3: DOM
- 4: Events
- 5: Debugging
- 6: Canvas
- 7: Modularisation
- 8: Server Part 1
- 9: Server Part 2
- 10: Style
- 11: Linting
- 12: Database
- 13: SVG
You could switch your copy of our code to a branch "x" (where x is a number) using any of the following tools:
Run the following in a shell (make sure to replace x with a branch number):
git checkout x
The following command shows you all the branches (hit q to exit):
git branch --all
Follow this instruction on how to switch branches on GitHub Desktop.
It is rather easy to do this in Visual Studio Code:
- Click on the "Checkout branch/tag" button in the bottom left corner of the screen (in the status bar).
- Search for the name of the branch you want to switch to (e.g., 0) or select it from the dropdown list.
For more info, take a look at this instruction on switching branches in Visual Studio Code.
When viewing the code in your favourite editor, make sure you are opening the "hangman-in-branches" folder (not individual files within it). So for example in Visual Studio Code, make sure you select "Open Folder" as opposed to "Open".
Always start by reading the README.md
file to see what were the objectives for the branch and notes on its implementation.
We point out that the .gitignore
file has been automatically generated for us by GitHub on the creation of a Node repository.
You don't need to worry about its content.
Generally speaking, it helps to ignore files that you don't want to be saved in your repository (e.g., settings of the code editor, node modules, etc.).