diff --git a/cardgame.gd b/cardgame.gd index 03f4fdb..c1bf5b9 100644 --- a/cardgame.gd +++ b/cardgame.gd @@ -57,6 +57,18 @@ var cards = [ "description": "Put the events in your current timeline on top of the specified one.", "energy": 1 }, + { + "command": 'git pull', + "arg_number": 0, + "description": "Get timelines from a colleague.", + "energy": 1 + }, + { + "command": 'git push', + "arg_number": 0, + "description": "Give timelines to a colleague.", + "energy": 1 + }, # { # "command": 'git update-ref -d', # "arg_number": 1, diff --git a/levels/time-machine/pull-push b/levels/time-machine/pull-push new file mode 100644 index 0000000..1e316d6 --- /dev/null +++ b/levels/time-machine/pull-push @@ -0,0 +1,42 @@ +[description] + +The events and timelines you see are always only what your own time machine knows about! + +Of course, time agents don't have to work alone! Here, your sidekick has already prepared a merge for you! You can use the "pull" card to transfer it to your own machine. + +Then, add another event on top, and "push" the result, to transfer it back to your sidekick! + +[setup yours] + +echo "Just woke up. Is hungry." > tom +git add . +git commit -m "The beginning" + +git checkout -b pancakes +echo "Had blueberry pancakes with maple syrup for breakfast." > tom +git add . +git commit -m "Pancakes!" + +git checkout -b muesli main +echo "Had muesli with oats and strawberries for breakfast." > tom +git add . +git commit -m "Muesli!" + +git checkout main + +git push -u sidekick main pancakes muesli + +[setup sidekick] + +git checkout main +git merge pancakes +git merge muesli + +echo "Had pancakes with strawberries for breakfast." > tom +git add . +git commit -m "Let's make this breakfast compromise" --author="Sidekick " + +[win sidekick] + +# Below main's parent, there is a rhombus: +git rev-parse main^^ && test "$(git rev-parse main^^1^)" = "$(git rev-parse main^^2^)" diff --git a/levels/time-machine/sequence b/levels/time-machine/sequence new file mode 100644 index 0000000..d85b2ef --- /dev/null +++ b/levels/time-machine/sequence @@ -0,0 +1,6 @@ +welcome +branches +merge +conflict +pull-push +rebase