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!
Everybody should do this again regardless you had done it already. I pushed new changes to the repo you need to have.
- Go to the repo page.
- Hit 'Clone or download' (big green button).
- Select 'Use SSH' and copy the link.
- Go to the terminal in your laptop. Go to a directory where you cant to save the project.
- Execute
git clone [email protected]:Platem/CS321-2018F-002.git
(that's the link you copied in step 3). - Now you've got the project in local! Great!
This is what Step 2 in the assignment asks for.
- 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.
- If you are not using a Windows OS, then you need to run
- 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.
- If you are in Windows, to execute a script you have to run the command like
- Run the
build
script (follow same patter as in step 2). This will compile the Java files. - 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 (&).
- 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 scriptrunClientLocal
. This will start the program with the client of the game. Now you can play around with it (Move, Look, Take things...). - 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!
- That's basically step 2 in the assignment! You did it!
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.
- In the terminal, go to the folder of the project (CS321-2018F-002) and change to the
0b_proof
branch. This can be done runninggit checkout 0b_proof
. If you look the content of the directory now, you should only see a file calledprof.txt
and a folder calledteam2
.- 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.
- 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
- You should now create a new branch called
feature/<name>_p0b
with your name (if your name is Kevin then you'd use the branchfeature/kevin_p0b
. You can do so runninggit branch feature/<name>_p0b
. Then change to that branch (git checkout feature/<name>_p0b
). - Go into the
team2
folder and you should see a file calledlearning.txt
and my screenshot taken before (screenshot_kevin.png
). Put you own screenshot in the folder. - 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 addx3
, etc.
- Save the file. If everything is good (you added your screenshot in the
team2
folder and your resources in thelearning.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 rungit 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".
- You need to do this from the project folder, not inside the
- 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.
- Change to the branch with
- 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.
- If someone else did this before you and you don't have their changes, you'll have to
- 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