Course:CPSC312-2018-BurgerStacker

From UBC Wiki

Authors: Rachel Sunderland, Joy Cheng

What is the problem?

We will be implementing a burger making game similar to this ice cream one. The player can move the base (bottom bun) left and right to catch the ingredients falling from the top.

The goal is to keep the ingredient stack as high as possible. If the player caught a top bun, then the game will end (win with the number of ingredients). If the player missed a ingredient (not top bun), then the game will end. The score of the game is the number of ingredients stacked on the burger.

What is the something extra?

We imported graphic libraries and images to enhance the user experience. The user would need to catch the ingredients but not a top bun or else the game will end. We will display the total score at the end, unless the game was lost due to not catching an ingredient. As the user catches more ingredients, the bottom layer of the ingredient will "disappear" below the screen to allow user to have more space to catch more ingredients. The score will still keep track of the total number of ingredients caught. The game also check for if the ingredient is caught too far away from the stack.

What did we learn from doing this?

(This should be written after you have done the work.) What is the bottom-line? Is functional programming suitable for (part-of) the task? Make sure you include the evidence for your claims.

We learned haskell graphic libraries (gloss). Adding graphics was more seamless than we had thought, and it wasn't hard to manipulate images on the screen. We learned to refractor the code to make cleaner and more readable code. Grouping the tasks into small functions enabled us to think closely about each part of the problem. Keeping track of the states of the game makes the programming part more intuitive. For example, we can get the current state of the game to check if we need to display win or lose of the game.

Links to code etc

https://github.com/rach96/BurgerStacker