Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Answer for pseudocode 2.1. Sudoku rules. Traditional Sudoku is a 9x9 puzzle grid composed by 3x3 subgrids. The objective is to fill the grid with
Answer for pseudocode
2.1. Sudoku rules. Traditional Sudoku is a 9x9 puzzle grid composed by 3x3 subgrids. The objective is to fill the grid with three rules: 1) each column, 2) each row, and 3) each of the 3x3 subgrids should contain all the digits from 1 to 9 only once (the order of digits does not matter). Figure 1 below shows a Sudoku puzzle and its solution. 3 46 7 89 4268 33 219 9615372 84 Figure 1. Traditional Sudoku puzzle (left) and its solution (right) from https://en. Your program should have the following menu options: 1. Load Sudoku 2. Play Sudoku 3. Exit Described next are the functionalities for each menu item. 2.2. Option 1-Load Sudoku This option will enable the user to input the name of a file where a traditional Sudoku puzzle is given. The digits of a row in a Sudoku use a 0 to represent an empty sell, a comma to separate the nine digits in a row, and a new line to separate rows. As an example, the puzzle 1.txt file provided in this assignment contains the digits of the puzzle shown in Figure 1 (left) as: 5,3,0,0,7.0,0,0,0 09,8,0,00,0,6,0 7,0,0,0,2,0,0,0,6 Figure 2. File representation of the puzzle shown in Figure 1 (left). The option 1 should use a method called loadSudoku that receives the name of the file (e.g., puzzle1.txt) as a parameter, reads the file, creates a 2-D array called Puzzle[lI based on the content of the file, and lastly returns the 2D array. This array will contain the digits for the puzzle Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started