Minecraft. Some Tech-based FTB pack can be a best solution at my look.
Play game, and keep programming inside.
(I suggest Direwolf20 packs - you can find lot's of videos about it)
Factor 1: each time when you confusing - you should look at google "how to craft something" or "why my turtle not working". Just like true programmer, always doing the same.
Factor 2: in-game programming - many mod-packs contain some tricky computer-mods. Mining turtles for example using Lua Programming language for AI scripting. Some computers works just like little linux, even with package managers.
Factor 3: Automatic - you can find lot's of videos and manualr how to automate things, fabrics, mining, processing with other devices and computers. This is really perfect brain-training.
Factor 4: When you game crash or you need to add install some specific mod, you need to look up for solution (just right here, on stackexchange) - you involuntarily start to understand how the game is arranged inside, and why.
After all - it's really interesting. And funny. And you definitely should play with your friend. :3
Twitch Client allow you to make custom mod packs quickly with any mod you want.