

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: Learn Pub/Sub Architecture
incomplete
2: Publisher
incomplete
3: Subscriber
incomplete
4: Event-Driven Design
incomplete
This lesson's interactive features are locked, please to keep using them
Publishers publish, and subscribers subscribe. You might also hear a few alternative terms:
Let's further separate the "subscribing" logic from the "distribution" logic.
Complete the doBattles function. It takes a user and an array of moves. It should return an array of pieces, Piece[], that represents the user's pieces that are in battle.
moves array.