Instantiate an object that solves the puzzle

Assignment Help C/C++ Programming
Reference no: EM132702782

An assignment that uses data structures to solve a triangular peg puzzle:

The puzzle we will solve is a simple peg jumping puzzle that looks like this:

There are a total of 15 holes in the board. One hole is always left open when setting up the pegs.

Pegs are removed by jumping as in checkers. You select one peg and jump over another to an open hole. The jumped peg is then removed. The arrow on the image shows a valid jump.

The goal is to empty all but one of the pegs off the board.

The open hole at the start of the puzzle can be any hole on the board. It is possible to clear all but one peg off regardless of where the starting hole is located.

Your program will get a solution for each of the 15 holes in the board and will display it as shown in the requirements.

It must find a solution for all 15 holes and not create one determined solution.

Requirements:

Must be in C# ONLY , no java or c++
You may use any of the data structures we have covered in class in your program. Your code MUST contain at least one data structure. (You will probably need more than one.)
You MAY NOT use arrays in your solution.
You will use a GUI to display your results.
The sole purpose of the GUI is to display the results.
The solution of the puzzle will take place in other classes. You will lose points if you do any of the puzzle solutions inside of the GUI event handler. Your event handler code should instantiate an object that solves the puzzle and can call the object's methods to solve the puzzle and get the results back.
You should update the text box in the GUI each time you solve for one of the holes. (Note that the update may not immediately appear in the textbox. That's not considered a problem.)
You will need to solve the puzzle for each available starting hole. For the sake of having a common frame of reference, we will number the holes in the board from 0 to 14, starting from the top.

As you get each solution, you will update the GUI with the sequence of jumps that were used to solve the puzzle. See the sample GUI image to see the format for the moves.
There is a performance requirement for this assignment: your program must be able to get a solution that leaves only a single peg for each of the 15 holes in less than 2 minutes. (That's 2 minutes to generate all 15 solutions, not 2 minutes for each one.) [In case you are worried about the performance requirement, the record for solving all 15 permutations of the puzzle is 6 milliseconds, done by a student four years ago.]
You may not hard code the solutions for each hole. Each must be generated by the program during execution.

Reference no: EM132702782

Questions Cloud

The dynamics of public policy in america : Public policy is a goal-oriented course of action that the government follows in dealing with a problem or issue in the country.
Explain what external stressors are associated with issue : Research the range of contemporary issues teenagers face today. In a 500-750-word paper, choose one issue (besides teen pregnancy) and discuss its effect.
Implement green management : Green management' is one of the current issues faced by the managers who should take into account the impact of the operations of their organisations
What amount need to report and where in income tax form : What amount need to report and where in income tax form? During the year, Janice also invested $6,000 (tax basis and at-risk basis) into ABC limited
Instantiate an object that solves the puzzle : An assignment that uses data structures to solve a triangular peg puzzle - The open hole at the start of the puzzle can be any hole on the board
What is official policy on sexual orientation discrimination : What is the official policy on sexual orientation discrimination at the organization in which you work or are interested in working?
Estimate the value of nabor? industries : N abo r Industries is considering going public but is unsure of a fair offering price for the company. Before hiring an investment banker to assist in making th
What is Jim after-tax cost of his house payment : Jim has a house payment of $2,000 per month of which $1,700 is deductible interest, What is Jim's after-tax cost of his house payment
How can privilege become a beacon for change : How can "privilege" become a beacon for change? Intimate partner violence expresses a need for power and control by many methods. Would you recognize them all?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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