Grid game setup

Now we’re going to set up a GUI project for real.

Go to your Github repo

Go to your Github repo and click the green Code button

Open Codespace tab

From there click the “Codespaces” tab.

Make a new Codespace

If you see something like this, click the big green button. Otherwise see the next slide.

If you don’t see that

If you’ve already created codespaces you won’t see the “Create codespace on main” button. In that case click the + icon.

Open a terminal

In the file explorer find the file start-project and right click on it and choose “Open in Integrated Terminal”. (This script mostly replaces the old make-project script though it’s still there too.)

Run start-project

In the terminal type:

./start-project grid-game

This will create a folder named grid-game under the projects folder and also populate it with the starter code.

Open GUI.java

Browse under grid-game in the file explorer and then click on GUI.java to open that file in an editor.

Run the code

Click the play button at the top of the page.

Click “Ports”

Open port in browser

Find the line that starts with 6080 and over over the “Forwarded Address” column. Some icons should appear. Click the globe.

Connect to noVNC

In the new browser tab click the Connect button.

Enter password

It will ask for a password. Enter vscode

Switch to desktop tab

Assuming you don’t get any error, switch back to the other tab and you should see a simple GUI.