Prevent illegal moves without crashing

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

working with 2D arrays. In the assignment, you will create a GUI version of the game Mini Sudoku.Mini Sudoku is a game played on a 6 x 6 grid of squares. At the beginning of the game, some of the squares are filled in with numbers, and the rest are blank. The object of the game is to place the numbers 1 to 6 on the board such that the following conditions hold Each row has the numbers 1 to 6

Each column has the numbers 1 to 6

Each group of 2 rows by 3 columns also has the numbers 1 to 6.

For example, a beginning configuration and solution to a Mini Sudoku board is as follows:

Beginning configuration

4 6 - 3 2 5

2 - 3 - - 6

6 2 4 5 - 1

3 - 5 4 - -

1 4 2 6 - -

- 3 - 2 1 -

Solution

4 6 1 3 2 5

2 5 3 1 4 6

6 2 4 5 3 1

3 1 5 4 6 2

1 4 2 6 5 3

5 3 6 2 1 4

Your goal is to write a program that will allow the user to try and solve mini-sudoku puzzles where the

initial configuration is specified in a text file.

Directions

1. Write an application using Swing that will allow a player to play mini-sudoku.

2. Your program must present the players with a graphical representation of the board of some kind, perhaps using JTextFields.

3. Your program must gracefully handle the case when a player tries to add a non-number to a square, or add a number that violates the Sudoku rules. It should prevent illegal moves without crashing.

4. When the game is over, the game must indicate that the game has been won.

5. The program must provide a menu to allow the user to load a file with an initial game configuration.

6. The program must provide a menu option to quit the program.

Reference no: EM13163367

Questions Cloud

Write a plausible chemical equation to interpret : write a plausible chemical equation to interpret at the atomic level what you observed in the reaction of Lysol Toilet Bowl Cleaner with 0.1 M AgNO3?
Explain a layer of peat beneath the glacial sediments : A layer of peat beneath the glacial sediments of the last ice age has a carbon-14/carbon-12 ratio that is 21.0% of that found in living organisms
Calculate the potential volume of the gas contained : Calculate the potential volume of the gas contained in 500-mL aerosol can when it is heated from 25 degrees C to 54 degrees C (approx. 130 degrees F) assuming a constant pressure.
How many grams of ammonium nitrate must have reacted : pure nitrogen can be prepared when an aqueous solution of ammonium nitrite decomposes to form water vapor and nitrogen gas. How many grams of ammonium nitrate must have reacted if 3.75dm3 of nitrogen gas was collected over water at 26C and 97.8 kP..
Prevent illegal moves without crashing : Your program must gracefully handle the case when a player tries to add a non-number to a square, or add a number that violates the Sudoku rules. It should prevent illegal moves without crashing.
How long will raw milk last in refrigeratior maintained : the activation energy for the reaction involved in the souring of raw milk is 75kj. milk will sour in about 8 hours at 21 degrees c. how long will raw milk last in refrigeratior maintained at 5 degrees c? assume rate constant to be inversely propo..
State what is the molar mass of the acid : what is the molar mass of the acid? If the standardization of the NaOH solution, why is it important to rinse the wet pipet with small portions of the standard oxalic acid solution
What masses of calcium sulfate and phosphoric acid : What masses of calcium sulfate and phosphoric acid can be produced from the reaction of 1.0 kg calcium phosphate with 1.0 kg concentrated sulfuric acid (98% H2SO4 by mass)?
How do compute the product distribution calculations : How do I calculate the product distribution calculations of the three peaks? Or the product ratios? The first peak was at 0.600, second at 0.95. Those are the retention times

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