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

  Write a program that plays a tic-tac-toe game.

Using functional decomposition, write a program that plays a tic-tac-toe game.

  Design and implement a library system

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.

  Uml diagram of all the classes

Speaking of converting into the correct object-type, the goal of the factory is to abstract away object creation.

  Construct vector and linked lists data structures

You will prepare sorted versions of the Linked Lists and Vector data structures developed in class

  Computer programming using c language lab

Computer programming using c language lab

  Public transport fare ticketing system

Implement and test a public transport fare ticketing system.

  By a minimal interpretation that makes a formula

By a minimal interpretation that makes a formula true, we mean that if one atom is removed from the interpretation then the resulting interpretation does no longer make the formula true.

  Implement circular linked list in c program

implement circular linked list in c program in the best possible easiest way.

  A palindrome is a number

A palindrome is a number or text phrase that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 34543 and 11611. Write a program that reads in a five-digit integer and determines ..

  Prepare a program that uses at least two functions

Prepare a program that uses at least two functions that can be called from your main.

  Calculation of mortgage interest rates

Instruction of pointers and the calculation of mortgage interest rates.

  Base process which communicate with child processes

Write a program which has a "base process" which communicates with child processes acting as "bombers" that it creates.

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