Skip to content

portsoc/hangman-in-branches

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 

Repository files navigation

Hangman in branches

About the project

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.

Prerequisites

On University machines

  1. Search for "Git GUI" and "Node.js" in AppsAnywhere and launch them.

  2. Launch an editor from AppsAnywhere (e.g., "Visual Studio Code" or "Atom").

  3. If you are a newcomer to Git, you could also search for and launch "Github Desktop Client".

On your computers

  1. Install Git and Node.

  2. Install an editor (e.g., Visual Studio Code or Atom).

  3. If you are new to GitHub, also install GitHub Desktop or GitHub client.

On Codespaces

  1. 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.

Viewing the code

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:

Option 1: Using Git

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

Option 2: Using GitHub CLI

Run the following in a shell:

gh repo clone portsoc/hangman-in-branches

Option 3: Using GitHub Desktop

While this repository is open in the browser, click the green "Code" button and then "Open with GitHub Desktop".

Option 4: Using Visual Studio Code

  1. Open Visual Studio Code and click on the "Source Control" icon on the left-hand sidebar.
  2. Click on the "Clone Repository" button in the opened panel.
  3. Paste the link to this repository (https://github.com/portsoc/hangman-in-branches) in the dialog box and press Enter.
  4. Select a location on your computer to save the repository.
  5. Now click "Open" to view the cloned repository in Visual Studio Code.

Clone repository in Visual Studio Code

For more information view this instruction on how to clone a repository in Visual Studio Code.

Selecting a branch

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:

You could switch your copy of our code to a branch "x" (where x is a number) using any of the following tools:

Option 1: Using Git

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

Option 2: Using GitHub Desktop

Follow this instruction on how to switch branches on GitHub Desktop.

Option 3: Using Visual Studio Code

It is rather easy to do this in Visual Studio Code:

  1. Click on the "Checkout branch/tag" button in the bottom left corner of the screen (in the status bar).
  2. Search for the name of the branch you want to switch to (e.g., 0) or select it from the dropdown list.

Switching branches in Visual Studio Code

For more info, take a look at this instruction on switching branches in Visual Studio Code.

Notes

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.).

(back to top)