Chess

Make a Game Session

  • Navigate Git Bash terminal into your Git-Started folder.

  • Write commands:

    $ git checkout -b Game-Session
    $ mkdir "Playground/Multiplayer/Chess/YourName vs OpponentsName"
    $ cp -i "Games/Multiplayer/Chess.md" "Playground/Multiplayer/Chess/YourName vs OpponentsName/Game Number.md"
    $ git add .
    $ git commit -a -m "Game start"
    $ git push -u origin Game-Session

Play the Game

  • Navigate through the Playground folder and find your Game Number.md file.

  • Open the file by right-clicking and choosing to open with a text editor. I highly recommend Notepad++ for this purpose.

  • First players FIRST turn:

    $ git checkout Game-Session
    # Makes a move and saves the file
    $ git add .
    $ git commit -a -m "White Move"
    $ git push -u origin Game-Session
  • Second players FIRST turn:

    $ git checkout -b Game-Session
    $ git pull origin Game-Session
    # Makes a move and saves the file
    $ git add .
    $ git commit -a -m "Black Move"
    $ git push -u origin Game-Session
  • Other turns:

    $ git checkout Game-Session
    $ git pull origin Game-Session
    # Makes a move and saves the file
    $ git add .
    $ git commit -a -m "White/Black Move"
    $ git push -u origin Game-Session

FULL EXAMPLE:

  • Joseph (white player) and Mathew (black player) are playing against each other their first game.

    $ git checkout -b Game-Session
    $ mkdir "Playground/Multiplayer/Chess/Joseph vs Mathew"
    $ cp -i "Games/Multiplayer/Chess.md" "Playground/Multiplayer/Chess/Joseph vs Mathew/Game 1.md"
    $ git add .
    $ git commit -a -m "Game start"
    $ git push -u origin Game-Session
  • Josephs FIRST turn:

    $ git checkout Game-Session
    # Opens the "Game 1.md" with a text editor.
    # Moves his pawn from e2 to e4 and saves the file
    $ git add .
    $ git commit -a -m "White e4"
    $ git push -u origin Game-Session
  • Mathews FIRST turn:

    $ git checkout -b Game-Session
    $ git pull origin Game-Session
    # Opens the "Game 1.md" with a text editor.
    # Moves his pawn from d3 to d5 and saves the file
    $ git add .
    $ git commit -a -m "Black d5"
    $ git push -u origin Game-Session
  • Josephs SECOND turn:

    $ git checkout Game-Session
    $ git pull origin Game-Session
    # Opens the "Game 1.md" with a text editor.
    # Eats a pawn on d5, copies him on the black graveyard and saves the file
    $ git add .
    $ git commit -a -m "White xd5"
    $ git push -u origin Game-Session
  • Mathews SECOND turn:

    $ git checkout Game-Session
    $ git pull origin Game-Session
    # Opens the "Game 1.md" with a text editor.
    # Heroically moves his pawn from e3 to e4 to avenge his fellow and saves the file
    $ git add .
    $ git commit -a -m "Black e5"
    $ git push -u origin Game-Session
  • And so on.

When commiting a message make sure to describe your move. If you don't feel like using the official move notation, just write something like "White K f3-f4" (white moved King from f3 to f4)

Last updated