In Progress

making a basic sudoku puzzle in java

Project Specification

In this project, you will create an interface for users to play sudoku. Note that you will NOT be generating the puzzle itself. You will develop an interface for the user to play the puzzle and verify if the user successfully completed the puzzle. If you are not familiar with the game of sudoko, read about it here. The game is really simple, but make sure you know the rules. (try a few easy ones yourself if you are unfamiliar with it)

Project Details

Figure below shows a sample puzzle that users of your program will try to solve. The letters a, b, c etc on the rows and columns are used to identify a specific cell in the puzzle. For example, in the figure below, (a, b) = 2, (b, e) = 8, (g, b) = 7 and so on. The order is (row, column).

Interacting with the user

When the program is run the first time, you should print the initial puzzle in the console as shown below. Underscore (_) denotes empty cells and the pipe(|) key separates two neighboring cells.

The game says 'Puzzle Incomplete!' and prompts the user to enter a new value. User can enter value for a new cell by specifying rowid columnid and value, each separated by a blank-space. In the run above, the user entered b a 9, which results in the program printing the second version of the puzzle with cell (b a) filled with value 9. Then user enters b b 3, and so on.

Other Notes

No need to check for invalid input. (eg: k b 10)

Users CANNOT overwrite the locked cells(The cells automatically filled when game is initialized). If user tries to change a locked cell, print “Fixed location. Cannot change value!” (See image below)

Users CAN overwrite editable or free cells any number of times.

The program just keeps displaying 'Puzzle Incomplete!' until the user gets it right.

If user enters duplicate values in the same row/col, allow it, but game should remain incomplete.

Valid Assumptions

User will always enter a char between a - i and value between 1 - 9.

The initial puzzle will have at least one empty cell.

There will always be one unique solution.

This cycle is repeated until the puzzle is solved.

Checking for puzzle completion

Every time user enters a new value, you need to check if the puzzle is complete. The puzzle gets completed when the 9×9 grid is completely full, with each column, each row, and each of the nine 3×3 sub-grids contains all of the digits from 1 to 9. In other words, a puzzle is considered complete when,

Within one row no digits are repeated.

Within one column no digits are repeated.

Within one 3×3 region no digits are repeated.

There are no empty cells.

Only the digits from 1 to 9 are used (both inclusive).

When the user completes the game, print 'Puzzle Complete!' and exit the game.

Implementation Details

Creating the Puzzle

You can assume the puzzle to be a 9×9 grid of 2-D integer array. The source files you downloaded contains [url removed, login to view] which defines this 2-D array. In this array, a value of (-1) indicates an empty cell. All other non-negative values denotes the initial, locked cells in the puzzle. Again, user is not allowed to change any of these locked cells.

Note that you should not add any additional variables or methods into this file - Constants.java. This file will be replaced for grading. IMPORTANT: Your program should work for any 9 x 9 sudoku puzzle that is represented by the 2-D game array in Constants.java.

Skills: Java

See more: sudoku puzzle java, sudoku java, create sudoku puzzle java, print sudoku array java, making sudoku java, tries java, solution specification, region 13, basic java sudoku, game making, a b, sudoko, puzzle game project, negative space, making a, letters a, java project details, java play, java free, java develop, java console, grading, free java, pipe game, play console

About the Employer:
( 4 reviews ) india, United States

Project ID: #2564023

Awarded to:

samitXI

Please check your inbox. Thanks

$30 USD in 1 day
(64 Reviews)
5.8

7 freelancers are bidding on average $75 for this job

dobreiiita

Hi, I am JAVA expert and can surely help you here, Please check your inbox, Thanks

$35 USD in 1 day
(170 Reviews)
6.4
msabouri

ready to finish this asap

$30 USD in 1 day
(43 Reviews)
5.0
utd2009

Hello Sir, Please check my message.

$90 USD in 3 days
(3 Reviews)
2.7
fihgu

Hi there, I'm interested in your project. please check your PM.

$60 USD in 1 day
(1 Review)
1.7
LahiruMal

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Let's begin just now.... $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

$30 USD in 1 day
(2 Reviews)
1.2
Drakoman123

Hi. I am a developer. How much wil you pay?

$250 USD in 7 days
(0 Reviews)
0.0