Add more congrats, missing cards

This commit is contained in:
Sebastian Morr 2020-10-22 17:27:54 +02:00
parent 5d59623392
commit af0d7928ef
10 changed files with 82 additions and 25 deletions

View file

@ -45,6 +45,12 @@ var cards = [
"description": "Make a new commit!",
"energy": 1
},
{
"command": 'git branch new',
"arg_number": 1,
"description": "Create a new timeline.",
"energy": 1
},
{
"command": 'git merge',
"arg_number": 1,

View file

@ -1,10 +1,16 @@
title = Parallel timelines
title = Parallelism
[description]
In this zoo, we found a few parallel timelines. Feel free to travel between the commits to see what's going on! The ends of the timelines have little tags attached.
In this zoo, we found a some parallel timelines. What's going on here? The ends of the timelines have little tags attached.
But especially the `bad_ending` one needs our attention! Can you travel to the `good_ending` one, and make a new commit that makes everyone happy?
Especially the `bad_ending` one needs our attention! Can you travel to the `good_ending` timeline, and make a new commit where everyone involved is happy?
[congrats]
Whew, good job! This seems like a *much* better outcome.
But our next mission is already waiting...
[setup]
@ -27,6 +33,7 @@ git branch good_ending
git rm cage/child
echo "Looks happy. :)" > cage/lion
git add .
git commit -m "Oh no"
git checkout HEAD~2

View file

@ -2,7 +2,7 @@ title = Contradictions
[description]
Sometimes, merging timelines will not be as simple, because they contradict each other.
Sometimes, timelines will contradict each other.
For example, in this case, one of our clients wants these timelines merged, but they ate different things for breakfast in both timelines.
@ -21,14 +21,26 @@ echo "Had blueberry pancakes with maple syrup for breakfast." > tom
git add .
git commit -m "Pancakes!"
echo "
Is at work." >> tom
git commit -am "Go to work"
git checkout -b muesli main
echo "Had muesli with oats and strawberries for breakfast." > tom
git add .
git commit -m "Muesli!"
echo "
Is at work." >> tom
git commit -am "Go to work"
git checkout main
[win]
# main has a parent, and the parent of both its first and child parents are the same commit:
git rev-parse main^ && test "$(git rev-parse main^1~)" = "$(git rev-parse main^2~)"
# main has a parent, and the grandparent of both its first and child parents are the same commit:
git rev-parse main^ && test "$(git rev-parse main^1^^)" = "$(git rev-parse main^2^^)"
[congrats]
Yum, that sounds like a good breakfast!

View file

@ -2,11 +2,11 @@ title = Merging timelines
[description]
Didn't get enouth sleep last night? Here's a trick so that you can sleep a bit longer: just do all your morning activities in parallel universes, and then at the end, merge them together!
Here's a trick so that you can sleep a bit longer: just do all your morning activities in parallel universes, and then at the end, merge them together!
There are already timelines where you get a baguette and coffee. Can you make a third one where you get a donut? Drag the "branch" card to a commit to make a new branch there.
Here, you see three parallel timelines - can you build a reality in the "main" timeline where you have a baguette, a coffee, *and* a donut?
And then, use the "merge" card to join the specified timeline together with your current one. If you merge everything into "main" in the end, into a reality where you have a baguette, a coffee, and a dount, and are outside of all shops, you can still make it to work on time!
The "merge" card will help you - try it!
[setup]
@ -56,8 +56,25 @@ git mv coffee_shop/you .
git add .
git commit -m "You leave the coffee_shop"
git checkout -b donut main
echo "You do not have a baguette.
You do not have coffee.
You have a donut." > you
git mv you donut_shop
git add .
git commit -m "You get a donut"
git mv donut_shop/you .
git add .
git commit -m "You leave the donut shop"
git checkout main
[win]
{ git show main:you | grep "You have a baguette"; } && { git show main:you | grep "You have coffee"; } && { git show main:you | grep "You have a donut"; }
[congrats]
I wonder if you're more relaxed when you try to *sleep* in parallel timelines...

View file

@ -4,10 +4,12 @@ title = Helping each other
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.
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 time machine.
Then, add another event on top, and "push" the result, to transfer it back to your sidekick!
You can only ever manipulate things in your own time machine (the one on the right).
[setup yours]
echo "Just woke up. Is hungry." > tom
@ -42,3 +44,7 @@ git commit -m "Let's make this breakfast compromise" --author="Sidekick <sidekic
# Below main's parent, there is a rhombus:
git rev-parse main^^ && test "$(git rev-parse main^^1^)" = "$(git rev-parse main^^2^)"
[congrats]
In reality, in many cases, a lot of time agents work together to build a really good future together! :)

View file

@ -1,10 +1,12 @@
title = No parallels allowed
title = Rebasing
[description]
Okay - turns out that saving time in the morning by utilizing parallel universes is against the regulations of the International Time Travel Association. You'll have to do your tasks in sequence after all.
See the "rebase" card? It takes a specified commit, and puts the events in your current timeline on top of the specified one! This way, make a clean, linear timeline where you visit all three shops.
See the "rebase" card? When you drag it to a commit, it will put the events in your current timeline on top of the specified one! This way, make a clean, linear timeline where you visit all three shops.
Again, we want to make that our base reality - the "main" tag should point to that timeline!
[setup]
@ -72,3 +74,7 @@ git checkout baguette
[win]
{ git show main:you | grep "You have a baguette"; } && { git show main:you | grep "You have coffee"; } && { git show main:you | grep "You have a donut"; } && { test "$(git log main --oneline | wc -l)" -eq 7; }
[congrats]
Notice how the other timelines and commits are still there - if anything goes wrong, you can also travel back to them.

View file

@ -4,11 +4,11 @@ title = Welcome!
Welcome, time agent! Good to see you - we could really use your help with fixing some temporal paradoxes!
First, let's make you familiar with the time machine you'll be using: each yellow box you see is a frozen point in time, we call them "commits"! You can travel to one by dragging the "checkout" card to it, and you can go back to the present by dragging it on the blue "main" node!
Each yellow box is a frozen point in time, we call them "commits"! You can travel to one by dragging the "checkout" card to it, and you can go back to the present by dragging it on the blue "main" tag!
The grey panel to the left shows your current environment - click on an object to inspect or modify it!
The grey panel shows your current environment - click on an object to inspect or modify it!
Can you find out what happened here? Then, come back to the present, fix the problem, and make a new commit!
Can you find out what happened here? Then, come back to the present, fix the problem, and make a new commit, using the "commit" card!
[setup]
@ -40,3 +40,5 @@ git commit -m "Little sister walks back"
[congrats]
Wonderful! Now that you're familiar with the time machine, let's look at some more complicated situations...
Click on "Next Level", as soon as you're ready!

View file

@ -66,29 +66,29 @@ __meta__ = {
}
[node name="Repositories" type="HBoxContainer" parent="Rows/Columns"]
margin_right = 1263.0
margin_right = 1136.0
margin_bottom = 784.0
mouse_filter = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 2.0
size_flags_stretch_ratio = 1.5
custom_constants/separation = 0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RightSide" type="VSplitContainer" parent="Rows/Columns"]
margin_left = 1275.0
margin_left = 1148.0
margin_right = 1904.0
margin_bottom = 784.0
size_flags_horizontal = 3
[node name="TopStuff" type="VBoxContainer" parent="Rows/Columns/RightSide"]
margin_right = 629.0
margin_right = 756.0
margin_bottom = 386.0
size_flags_vertical = 3
[node name="Menu" type="HBoxContainer" parent="Rows/Columns/RightSide/TopStuff"]
margin_right = 629.0
margin_right = 756.0
margin_bottom = 35.0
[node name="ChapterSelect" type="OptionButton" parent="Rows/Columns/RightSide/TopStuff/Menu"]
@ -144,12 +144,12 @@ __meta__ = {
[node name="LevelPanel" type="VBoxContainer" parent="Rows/Columns/RightSide/TopStuff"]
margin_top = 40.0
margin_right = 629.0
margin_right = 756.0
margin_bottom = 386.0
size_flags_vertical = 3
[node name="LevelName" type="RichTextLabel" parent="Rows/Columns/RightSide/TopStuff/LevelPanel"]
margin_right = 629.0
margin_right = 756.0
margin_bottom = 60.0
rect_min_size = Vector2( 0, 60 )
custom_fonts/normal_font = ExtResource( 7 )
@ -160,7 +160,7 @@ __meta__ = {
[node name="Text" type="Control" parent="Rows/Columns/RightSide/TopStuff/LevelPanel"]
margin_top = 65.0
margin_right = 629.0
margin_right = 756.0
margin_bottom = 346.0
size_flags_vertical = 3
@ -191,7 +191,7 @@ __meta__ = {
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 398.0
margin_right = 629.0
margin_right = 756.0
margin_bottom = 784.0
size_flags_vertical = 3

View file

@ -112,7 +112,7 @@ __meta__ = {
[node name="FileBrowser" parent="Rows" instance=ExtResource( 4 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 937.0
margin_top = 800.0
margin_right = 1920.0
margin_bottom = 1080.0
size_flags_vertical = 3

View file

@ -121,6 +121,7 @@ func run_command_in_a_thread(command):
var o = repository.shell.run(command, false)
if repository.shell.exit_code == 0:
$OkSound.pitch_scale = rand_range(0.8, 1.2)
$OkSound.play()
else:
$ErrorSound.play()