Skip to content

Instantly share code, notes, and snippets.

@kevinrpb
Last active September 17, 2018 13:39
Show Gist options
  • Save kevinrpb/29d38618fb0a89f7242bb3d859761231 to your computer and use it in GitHub Desktop.
Save kevinrpb/29d38618fb0a89f7242bb3d859761231 to your computer and use it in GitHub Desktop.
CS321 Project 0b Instructions

Project 0b - Instructions

This are the instructions on how to do the assignment. It's pretty straightforward, but just in case anyone finds eny difficulties with it. I'd suggest first thing you do is READ THE ASSIGNMENT and come here only if you have trouble. If you do, that's find. Follow the guide or ask for help in Slack. Good luck with it!

Get the repo in local

Everybody should do this again regardless you had done it already. I pushed new changes to the repo you need to have.

  1. Go to the repo page.
  2. Hit 'Clone or download' (big green button).
  3. Select 'Use SSH' and copy the link.
  4. Go to the terminal in your laptop. Go to a directory where you cant to save the project.
  5. Execute git clone git@github.com:Platem/CS321-2018F-002.git (that's the link you copied in step 3).
  6. Now you've got the project in local! Great!

Run the project

This is what Step 2 in the assignment asks for.

  1. In your terminal, after following the steps to get the repo in local, access the folder fo the project and, inside it, access the src folder.
    • If you are not using a Windows OS, then you need to run chmod +x *.sh here.
  2. Run the clean script.
    • If you are in Windows, to execute a script you have to run the command like ./<command>.bat, so in this case it would be ./clean.bat.
    • Otherwise you run them with ./<command>.sh. Here it's ./clean.sh.
    • Note: This script might show an error saying it couldn't find a process. That's how it is supposed to work. This script attempts to kill the server process if it had been running before so it doesn't cause any problems.
  3. Run the build script (follow same patter as in step 2). This will compile the Java files.
  4. Run the runServer script (follow same patter as in step 2). This will start a program with the server in it (and will show).
    • You might need to modify this script if you are in Linux/MacOS. Remove the semicolon (;) after the ampersand (&).
  5. Now you need to open a new terminal window (and let the one in step 4 running!). In it, go to the same folder (src inside the project). There, run the script runClientLocal. This will start the program with the client of the game. Now you can play around with it (Move, Look, Take things...).
  6. Now you need to take a screenshot with both terminal windows (the server form step 4 and the client from step 5) running. As simple as that. Save this screenshot for the next step!
  7. That's basically step 2 in the assignment! You did it!

Proving the work

Now we need to proof to the profesor that we followed the steps and that we know how to us git. Here you have a git cheatsheet you can have in hand if you are not super familiar with it.

  1. In the terminal, go to the folder of the project (CS321-2018F-002) and change to the 0b_proof branch. This can be done running git checkout 0b_proof. If you look the content of the directory now, you should only see a file called prof.txt and a folder called team2.
    • If it asks you about changes you made (when following the steps to run the project), the easiest way to go about it is to run git checkout . to reset the repo.
    • If it tells you that it cant find the branch, run git checkout --track origin/0b_proof instead. This will retrieve the branch from the remote repo.
  2. You should now create a new branch called feature/<name>_p0b with your name (if your name is Kevin then you'd use the branch feature/kevin_p0b. You can do so running git branch feature/<name>_p0b. Then change to that branch (git checkout feature/<name>_p0b).
  3. Go into the team2 folder and you should see a file called learning.txt and my screenshot taken before (screenshot_kevin.png). Put you own screenshot in the folder.
  4. Now go ahead and open the learning.txt file. Here add the resources (web pages, books, videos) you used to learn git.
    • Following the instructions if any of the resources was not mentioned in class (or you don't remember whether it was), then add a sentence explaining it and a link if possible.
    • If someone else in the group already added the resource you used, simply include x2 in the end of the line. If more people used it add x3, etc.
  5. Save the file. If everything is good (you added your screenshot in the team2 folder and your resources in the learning.txt file) then commit your changes.
    • You need to do this from the project folder, not inside the team2 folder.
    • First stage the files with git add -u (this puts all the files in the directory in staging, ie ready to commit). This adds previously tracked files that were modified. Because you also added a new file (the screenshot), you need to also run git add team2/<your_file>.
    • Then commit running git commit -m "<message>". In the message you should write something like "Added my screenshot and updated learning resources".
  6. When you have done all your changes in your branch, you need to merge into the 0b_proof branch again.
    • Change to the branch with git checkout 0b_proof.
    • Merge with git merge feature/<name>_p0b
    • It shouldn't give any problem at this. If it does try to solve or reach in Slack for help.
  7. It's time to send your changes to the remote repo! git push should do the job.
    • If someone else did this before you and you don't have their changes, you'll have to git pull and fix the merge conflicts.
  8. Goooooood job guys! You completed the assignment! Tell the others in Slack and/or update Trello so we are aware you are doing good and so that I know when everyone is done to submit the assignment.
Kevin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment