FlipFlaps fltk project, C/C++ Programming

Assignment Help:
The project is to design and write a C++11/FLTKgame program with a graphical user interface.The game is based on "pancake sorting," as described at
https://en.wikipedia.org/wiki/Pancake_sorting, which actually has some mathematical significance. (Note that Bill Gates was a freshman at Harvard when he and one of his professors wrote a research paper about this!)

The heart of the game is a centered stack of pancakes, each one a different size. The goal is to get the stack into order (from smallest on top to largest on bottom) by flipping over the top partial stack of some number of pancakes. See the Wikipedia article for an example flipping the top three pancakes. Since we''re flipping flapjacks, the game is named "FlipFlaps
The program must:
1. Start with an attractive splash screen showing (at least) the name of the game ("FlipFlaps"), the team number, and the team members'' names. Feel free to add team members'' pictures, animations (see extra credit section below), etc.
2. Explain how to play the game.
3. Ask for the player''s initials and display the top 5 scores read in from the disk (see item 6 below) followed by the player''s initials. The top scores file starts out empty.
4. Ask for a difficulty level from 2 to 9; this is the number of pancakes. Each pancake is a different size. Display the pancakes in a centered stack in a random order. Hint: Look up "permutation" at cplusplus.com.
5. Allow the player to select where to insert the spatula(below some pancake); you may decide to have a button beside each possible spatula position, or choose some other way to indicate where to flip. When the player clicks the "Flip!" button, flip over the partial stack above the spatula and redraw the screen.
6. If the pancake stack is now in order, from smallest on top to largest on the bottom, calculate the player''s score (see "Scoring" below) and display it next to the player''s initials. Sort the list of 6 scores and write the top 5 out to disk with initials. Then the next time the game is played that file will be read in and displayed in step 3 above. Note: The game is also over if the player makes too many flips (see "Scoring" below).Ask the player if they want to play another game or quit.

Scoring: The instructors will provide a function named find_solution which calculates the minimum number of flips needed for a particular stack of pancakes. The score for one game is 100 minus 10 times the number of unnecessary flips more than the minimum, multiplied by the difficulty level.For example, if a particular stack of 6 pancakes could be flipped into order with 5 flips (according to the find_solution function), but the player takes 7 flips, then the score is [100 – 10 * (7 – 5)] * 6 = 480. The score for a game cannot go below zero, so in this case the game ends after 15 flips even if the pancakes are still not in order.
Display "Can be done in xx flips" (use the information from find_solution). Also display a running count of how many flips so far, and the player''s score so far.

Related Discussions:- FlipFlaps fltk project

Explain pure virtual functions, Pure Virtual Functions An abstract clas...

Pure Virtual Functions An abstract class is one, which is used just for deriving some other classes. No object of this class is declared and used in the program. Likewise, ther

Prepare windows shell extension, Prepare Windows Shell Extension Project...

Prepare Windows Shell Extension Project Description: Skills required are C++ Programming, Windows Desktop, Windows API

Decoding smugglers message, Smugglers are becoming very smart day by day. N...

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Heating and thermodynamic, i want software to calculate heating or use ther...

i want software to calculate heating or use thermodynamic equation , pleas help me

Need a solution, Hello. I need a solution for this assignment. It is for C+...

Hello. I need a solution for this assignment. It is for C++ Language: Create a BusinessPartner class that contains a first name, company name, and a telephone number. Create a Con

Padovan string, A Padovan string P(n) for a natural number n is defined as:...

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t

E^x, Write a program to calculate e^x using the formula: e^x = 1 + x/1! + ...

Write a program to calculate e^x using the formula: e^x = 1 + x/1! + x^2/2! + x^3/3! + ...... Allow the user to enter the integer number x, then do the calculation in a loop (for

Define a function in c program, Define a function in c program: int f1...

Define a function in c program: int f1() { static int x=10; return x; } int f2() { int y=5; return y; } extern int z; void f()     {

Assignment, Ask question #MA company is rewriting its payroll system to mov...

Ask question #MA company is rewriting its payroll system to move it from an old mainframe to a distributed mini-computer/PC-based networked setup. No new functionality will be adde

develop a calculator in masm, Part 1 Assignment:  develop a calculator...

Part 1 Assignment:  develop a calculator in MASM. Text chapters covered:  1 through 4, 5.4, 5.5, 6.3, 7.4 You will develop a "calculator" algorithm in MASM using reverse-

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd