Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 2.83 KB

File metadata and controls

63 lines (41 loc) · 2.83 KB

GIT

We'll use git to submit the changes we make. Git can be a bit diffcult to get started with but it's an essential tool for software development these days. Maybe see one of these videos for an introduction:

You can test your git skills by submitting changes to this GIT test file.

GIT Setup

When you submit changes, it's good to have your name and email included so people can over time see all the works you've done on GitHub. Setup your git user on your local machine using these commands in a terminal:

git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "YOUR@EMAIL.COM"
git config --global pull.rebase false  # easier for beginners

Fork

  • create or login to your GitHub account
  • create your own fork by clicking 'Fork' on one of these repos
  • 'git clone' your fork to make your local working copy

Make Changes

Read the code and make your changes, maybe:

  • change behavior
  • add a new unit type
  • add special effects
  • add new game dynamics
  • ...

Code overview

For the code structure see this UML class diagram:

Classes

and the import relations:

Packages

We expect you to write and understand the changes you submit. You may use AI to understand the code or when you get stuck, but submitting changes largely generated by AI is not appreciated.

Submit Changes

  • go to your fork on GitHub
  • get all changes by others from the repo you forked from by clicking 'X commits behind' (if any, do this regularly to keep up to date)
  • 'git pull' these changes to your local working copy
  • merge these changes with your own changes
  • 'git push' the merged changes back to your fork
  • on GitHub, click 'New Pull Request' button on your fork to submit your changes as pull request
  • wait for your changes to be reviewed and accepted

If merging was too difficult, or your pull request is not accepted (maybe because your changes made the code too complex for beginners), send me the URL of your fork so I can add it as active fork so people can still play your game and make further changes to your fork. Then when accepting pull requests from others, first review the changes and reject malicious code to keep things safe.

GIT test file

If you want to test submitting changes using git, add a few lines to this git_test_file.txt and submit it to the repo you forked from.