Course:CPSC312-2017-Wheel of Fortune

From UBC Wiki
Jump to: navigation, search

Wheel of Fortune

Authors: Kevin L, Trevor S

What is the problem?

State the general problem. If applicable, tell us what information you will use, e.g., a link to some web site that provides the information you used. What will you do?

Wheel of Fortune is a TV Game Show that has been on the air since 1975 (it has had some changes over the years but more or less remains the same. See https://en.wikipedia.org/wiki/Wheel_of_Fortune_(U.S._game_show) for more information). We will be attempting to create a Haskell Program that allows two players to simulate being participants in the game show. Players will take turns spinning a wheel and guessing letters to the puzzle, winning the amount of money the wheel landed on. The first player to solve the puzzle wins the game with the corresponding winnings earned.

What is the something extra?

What is the in-depth aspect you will do? If the problem is related to some other group's project, tell us how they fit together. If in doubt, include the information.

We will make use of lists in Haskell to create the puzzles (both solution and as-you-fill-it-in puzzle that the player sees), as well as a 'wheel'. We will investigate the use of random number generators to allow for random spins of the wheel. Players will need their winnings tracked. If there is time, we will attempt to have the option to play against a computer, and possibly have multiple puzzles to be solved in a single game, in order to accumulate winnings. In order to visualize the game, we will be using the Gloss packages for Haskell, which can be found on Hackage here: https://hackage.haskell.org/package/gloss

What did we learn from doing this?

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

Working on this project brought back memories of building world programs in Racket in CPSC 110. Functional programming was suitable for the task of building a game. Most of the Wheel of Fortune game is static and requires user interaction. Functional programming with the Gloss library allowed us to build a game state that responds to user input. It also allowed us to build a nice visual representation. The random number generators were the biggest hurdle, as we initially struggled with the concept of monads. Overall we accomplished what we set out to do - there are a few features that could still be added, like having multiple puzzles in a game and accumulating winnings, or building an AI to play against.

Code here: https://github.com/klapyere/WheelOfFortune