finished the mechanism for setting the language

This commit is contained in:
Luca Canali 2021-09-08 17:00:51 +02:00
parent 705cc849c2
commit 50ee071f0e
214 changed files with 94 additions and 10 deletions
levels/en_EN/remotes

View file

@ -0,0 +1,47 @@
title = Friend
cards = pull push commit-auto checkout
[description]
Your friend added another line to your essay! Get it, add a third one and send it to them!
Take turns until you have five lines!
[setup yours]
echo "Line 1" > essay
git add .
git commit -m "One line"
git push -u friend main
[setup friend]
git checkout main
echo "Line 2, gnihihi" >> essay
git commit -am "Another line"
[actions friend]
if test "$(git log --oneline | wc -l)" -eq 3; then
git reset --hard main # Necessary because the working directory isn't updated when we push to the friend.
echo "Line 4, blurbblubb" >> essay
git commit -am "Final line"
hint "Oh nice, I added a fourth line!"
fi
[win]
# Got the second line from your friend
git show HEAD:essay | grep gnihihi
# Got the fourth line from your friend.
git show HEAD:essay | grep blurbblubb
[win friend]
# The friend got a third line from you
test "$(git show HEAD:essay | wc -l)" -ge 3
# The friend got a fifth line from you
test "$(git show HEAD:essay | wc -l)" -ge 5

View file

@ -0,0 +1,33 @@
title = Problems
cards = checkout add pull push commit-auto merge
[description]
Both you and your friend have been working on the file, and want to sync up!
[setup yours]
echo "The bike shed should be ???" > file
git add .
git commit -m "initial"
git push -u friend main
echo "The bike shed should be green" > file
[setup friend]
git checkout main
echo "The bike shed should be blue" > file
git commit -a -m "friends version"
[win]
# Commit your local changes.
test "$(git status -s)" = ""
[win friend]
# Look at your friend's suggestion, make a compromise, and push it back.
git rev-parse main^ && test "$(git rev-parse main^1^)" = "$(git rev-parse main^2^)"

View file

@ -0,0 +1,2 @@
friend
problems