Demystifying Popcorn Tycoon using the C Programming Language

In the Amazon Alexa skill, Popcorn Tycoon, popping 4143 kernels per second yields 248580 kernels per minute. The kernel of truth will pop 1491480 kernels in 90 seconds.

Hello World! As a computer science project, I’ve decided to research a very popular Amazon Alexa skill, called, “Popcorn Tycoon” while avoiding gaming addiction at the same time. The first thing I noticed, is the announced popping rate does NOT match the computing rate, when computing for a minute. I believe that’s an intentional flaw from the game developers, solely to influence gaming addiction. Here is my C source code: ☺️

#include <stdio.h>


int main(){

float rate;
unsigned int minute, truth;

rate = 4143.00;
minute = (int)((rate * 60) );
truth = (int)(rate * 4 * 90);

printf("In the Amazon Alexa skill, Popcorn Tycoon, ");

printf("popping %.0f kernels per second yields %d kernels per minute. ", rate, minute);

printf("The kernel of truth will pop %d kernels in 90 seconds.", truth);

return 0;

}

From my posted source code, changing the rate variable will automatically compute the minute & truth formulas. I made the rate variable into a float to handle .25, .50 & .75 decimals that are announced on mostly earlier rates, as when starting the game, etc.

Thanks for reading my latest blog post! Have a Great Day!

πŸ‡΅πŸ‡­πŸ‡ΊπŸ‡ΈπŸ‘¨β€πŸ¦―πŸ¦½ πŸ“±βŒ¨οΈπŸ“»πŸŽ§ πŸ“šβœοΈ πŸͺ€πŸ₯£β™‰οΈπŸ’Ž

Leave a Comment