Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c#, you are to design the interface for a Sudoku 4x4 game. Click on this link for the rules of the game. A 4x4

in c#, you are to design the interface for a Sudoku 4x4 game. Click on this link for the rules of the game.

A 4x4 Sudoku contains 4 rows and four columns. It has also four boxes

Each game consists of a 4x4 grid containing given clues in various places. The object is to fill all empty squares (cells) so that the numbers 1 to 4 appear exactly once in each row, column and box.(each colored in the picture above)

Each cell has a location as follows

1

2

5

6

3

4

7

8

9

10

13

14

11

12

15

16

Attached to this HW, you will find a text file that contains several configurations of puzzles. Each line in the file is a puzzle configuration consisting of 16 number.

This is an example of the first line (from the file attached)

2103002000100400

Each non-zero number is placed in its appropriate square according to its location. For example, the above line should fill out the puzzle as follows

2

1

3

2

4

1

This is a two part HW. Your job for part 1 is to create the interface similar to the one below

Your GUI should create the board with all 16 cells (you can use labels, buttons, or whatever you like as long as is looks great), a check solution button (to check the solution), a restart button to restart the game with a different configuration, and an exit button.

Now, lets talk about programming. Your program should start by reading the configuration text file at the start of the program, and save all configuration (lines) in an array of type char (figure out the dimension(s) to use), then close the file. The file that you read could have a dynamic number of lines. Make sure you do not fix (hard code) the number of lines that can be read from the file.

2103002000100400 1003340020000001 0001120300400020 0203300000200140 4210000001002003 0040030001303020 0300200410000012 4000001002004021 0200002030204001 0040010220000423 4000000220041400 0200103201200001 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions