Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
bleeptrack 2020-12-22 17:53:25 +01:00
commit 2e6d30134c
2 changed files with 50 additions and 7 deletions

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

@ -167,18 +167,14 @@ func repopulate_chapters():
chapter_select.select(current_chapter)
func update_repos():
var win_states = levels.chapters[current_chapter].levels[current_level].check_win()
show_win_status(win_states)
for r in repositories:
var repo = repositories[r]
repo.update_everything()
file_browser.update()
index.update()
#if levels.chapters[current_chapter].levels[current_level].check_win():
# show_win_status()
var win_states = levels.chapters[current_chapter].levels[current_level].check_win()
show_win_status(win_states)
func toggle_cards():
cards.visible = not cards.visible