Learn stacks and queues with Calamity Foo



Meet Calamity Foo and her Wild West Pets

Head on over to Buffoolo Creek to see the greatest show on Planet Foo – Calamity Foo’s Wild West Pets. This new minigame teaches stacks and queues, two important types of data structures in computer science.

Who is Calamity Foo?image_CalamityFoo_lasso

Calamity Foo is the newest addition to Planet Foo. She was once a lassoist who became the first Foo ever to lasso the elusive White Buffoolo, one of the fastest and most acrobatic animals in the world. But Calamity Foo felt bad for the White Buffoolo and decided release it back into the wild. The two later became friends, which inspired Calamity to start training wayward pets for an acrobatic show. Her Wild West Pets show is now one of the most popular shows in all of Planet Foo.

What are stacks and queues?

Our gameplay programmer, Katie Powell, who coded the minigame, explains stacks and queues:

Computer scientists have to use data structures all the time – this is how they store and retrieve information. Stacks and queues are two types of data structures commonly used in computer science.

An important part of data structures is recognizing how to retrieve individual elements. In pet stacker, the pets are “queued” up on a ladder and are getting ready to jump onto the “stacks” on stage in a certain order.

Wild West Pets

In a queue, information that goes in first, comes out first. You can see in this Wild West Pets level that the first pet lined up on the diving board will be the next pet to land on the pedestal. In a stack, the information that goes in first comes out last. The pig on the very bottom of the pedestal “stack” will have to wait for all of the other pets to jump off before it can leave the pedestal.

Essentially, Wild West Pets is asking kids to “pop” information out of a “queue” and “push” that information into “stacks.” “Push” in computer science means add an element to a data structure, while “pull” means to remove it. Isn’t that cool?

See you at the Wild West Pets show!