Professional Documents
Culture Documents
Project Report On "Android Sudoku Game": Gogte Institute of Technology
Project Report On "Android Sudoku Game": Gogte Institute of Technology
Project Report on
“Android Sudoku Game”
A dissertation report submitted in partial fulfilment of the requirements
for the award of degree of
_______________ ___________________
Head of Department Principal
Dr. S. I. Goudar Dr. J. K. Kittur
Assoc Prof. and Head, Dept of M.C.A. K.L.S. Gogte Institute of
Technology
K.L.S. Gogte Institute of Technology, Belagavi Belagavi
Examine Examiner Examine Examiner Date
r1 1 r2 2
Name Signature Name Signature
ACKNOWLEDGEMENT
We are thankful to Principal Dr. J. K. Kittur for having provided us the academic
environment in contributing to the success of academic project.
We are deeply grateful to Dr. S. I. Goudar our beloved Head of the Department, for
having provided us the academic environment which nurtured our practical skills
contributing to the success of our project.
We are thankful to Mr. Hrishikesh Mogare worthy guide, for his support, cooperation and
presence provided to us during the course of the project. Our diction falls short of words to
gratify the faculty members of our department for being the source of inspiration.
Lastly, with unquantifiable affection and reference We wish to express our sincere
feeling to our parents and friends in the form of words which are restricted in expression and
quantum.
Dhanagouda Patil.
Darshan Magadum.
TABLE OF CONTENTS
1. INTRODUCTION 1
2. LITERATURE SURVEY 2
2.1 EXISTING SYSTEM 2
2.2 PROPOSED SYSTEM 2
3 SYSTEM REQUIREMENTS so on
4 SOFTWARE REQUIREMENTS SPECIFICATIONS
5 SYSTEM DESIGN
5.1 DATA FLOW DIAGRAM
5.2 USE CASE DIAGRAM
5.3 ACTIVITY DIAGRAM
5.4 CLASS DIAGRAM
5.5 E-R DIAGRAM
5.6 DATABASE METADATA
6 IMPLEMENTATION
6.1 MODULE-1
6.2 MODULE-2
6.3 AND SO ON (WRITE YOUR PROJECT MODULE NAMES)
7 TESTING
7.1 UNIT TESTING
7.2 FUNCTIONALITY TESTING
7.3 INTEGRATION TESTING
7.4 VARIFICATION AND VALIDATION TESTING
8 FUTURE ENHANCEMENT
9 CONCLUSION
10 BIBLIOGRAPHY
1. INTRODUCTION
Computers are one of the essential parts of the improvement of information technology.
The computer that was initially only used by academics and the military is now widely used
in various fields, such as business, health, education, psychology, games, and so on. The
development of Android-based adolescent reproductive health promotion is one of the efforts
to increase adolescent knowledge about adolescent reproductive health.
Thus came the idea to create an Android application that can generate puzzles and solve
them. Fromthe exposure, it can be determining the limitations of the problem are as follows:
Making this Sudoku game implements the backtracking algorithm on mobile / Android applications.
The programming language used is java. Supporting software used to make Sudoku games is Android
studio.
Sudoku puzzles used are a standard size 9 x 9 boxes.
The initial element generated consists of a maximum of 36 numbers and a minimum of 27 puzzle
numbers that have been filled in with numbers, and each row, column, and block (3x3) has been
filled in at least one box and may not be empty on each of its genera.
1.1Preface
Sudoku is the Japanese abbreviation of a phrase meaning the digits must remain single,
also known as Number Place, where Su means number, doku which translates as single or
bachelor. Sudoku is not a mathematical or arithmetical puzzle. It works just as well if the
numbers are substituted with letters or some other symbols, but numbers work best. The aim
of the puzzle is to enter a numerical digit from 1 through 9 in each cell of a 9×9 grid made up
of 3×3 subsquares or subgrids, starting with various digits given in some cells; each row,
column, and subsquares region must contain each of the numbers 1 to 9 exactly once.
Throughout this document we refer to the whole puzzle as the grid/game board, a 3x3
subgrid as a block and the individual grids that contains the number as a cell.
1.2Abstraction
Sudoku is a pretty popular number game.The goal of this game is to fill a 9x9 matrix with
unique numbers, and there should not be repeated numbers in each row, column, or block.
This paper proposed a solution to solve Sudoku using the Backtracking Algorithm. This
algorithm is quite efficient because it does not have to check all the possibilities that exist,
but which leads to only the solution that will be processed, namely by pruning every element
that does not lead to the solution. Thus the time required is quite efficient and suitable for use
in reasonably complex numbers games like sudoku. By implementing the backtracking
algorithm in the sudoku game, the complexity of the algorithm can be as large 𝜽 (n3).
A Sudoku starts with some cells containing numbers and the goal is to solve the remaking
this Sudoku game implements the backtracking algorithm on mobile / Android applications.
Proper Sudoku have one solution. The programming language used is java. Supporting
software used to make Sudoku games is Android studio.
Sudoku puzzles used are a standard size 9 x 9 boxes. The initial element generated
consists of a maximum of 36 numbers and a minimum of 27 puzzle numbers that have been
filled in with numbers, and each row, column, and block (3x3) has been filled in at least one
box and may not be empty on each of its genera.maining cells.One or more known Sudoku
which satisfy or nearly satisfy the characteristic being searched for is used as a starting point.
1.3Objective
One common method of searching for Sudoku with a particular characteristic is called neighbor
searching. Using this strategy, one or more known Sudoku which satisfy or nearly satisfy the
characteristic being searched for is used as a starting point, and these Sudoku are then altered to look
for other Sudoku with the property being sought. The alteration can be relocating one or more clue
positions, or removing a small number of clues, and replacing them with a different number of clues.
2. LITERATURE SURVEY
Backtracking Algorithm
D.H. Lehmer was the first to introduce the backtracking algorithm in 1950. The
backtracking algorithm is one of the problem-solving methods included in a strategy based
on searching the solution space, but it does not have to examine all possibilities, only those
that lead to only solutions will be processed. Algorithms backtracking is also an algorithm
that works recursively, where the search process is based on the Depth-First Search (DFS)
algorithm, which is to search for systematic solutions to all possible solutions and search for
answers is done by tracing a tree-shaped structure rooted. Therefore this algorithm is quite
powerful and very good to be applied in problem-solving and to provide artificial intelligence
in the game. Several types of digital games that are generally commonly known by the
public, such as Chess, Math Maze, Tic Tac Toe, to Sudoku can be found a solution by
implementing the backtracking algorithm.
Project requirement are conditions or tasks that must be completed to ensure the success or
completion of the project. They provide a clear picture of the work that needs to be done. They’re
meant to align the project’s resources with the objectives of the organization.
4.1.1Software Requirements
Operating System : windows 7, windows 8, windows 10
Design : XML
Tools : Android Emulator Android SDK- adk-bundle-
windows-x86 Jdk-8u66-windows-x86
4.1.3 Languages
Get Hint
6.1 Main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/wall"
android:orientation="horizontal"
android:padding="85dip">
<LinearLayout
android:layout_width="249dp"
android:layout_height="250dp"
android:layout_gravity="center"
android:orientation="vertical">
<Button
android:id="@+id/new_button"
android:layout_width="200dp"
android:layout_height="55dp"
android:layout_margin="5dip"
android:background="@drawable/button1"
android:text="@string/new_game_label"
android:textAppearance="@android:style/TextAppearance.Material.Large"
android:textStyle="bold" />
<Button
android:id="@+id/about_button"
android:layout_width="200dp"
android:layout_height="55dp"
android:layout_margin="5dip"
android:background="@drawable/button1"
android:text="@string/about_label"
android:textAppearance="@android:style/TextAppearance.Material.Large"
android:textStyle="bold" />
<Button
android:id="@+id/exit_button"
android:layout_width="200dp"
android:layout_height="55dp"
android:layout_margin="5dip"
android:background="@drawable/button1"
android:text="@string/exit_label"
android:textAppearance="@android:style/TextAppearance.Material.Large"
android:textStyle="bold" />
<CheckBox
android:id="@+id/mus"
style="@android:style/Widget.DeviceDefault.Light.CompoundButton.CheckBox"
android:layout_width="200dp"
android:layout_height="40dp"
android:autoText="false"
android:onClick="onClick"
android:text="Music"
android:textAppearance="@android:style/TextAppearance.Material.Large"
android:textColor="#000000"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
5.3.2 Keypad.xml
import android.app.Activity;
import android.app.Dialog;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.text.style.BackgroundColorSpan;
import android.util.Log;
import android.view.Gravity;
import android.widget.Toast;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d(TAG, "onCreate");
import java.util.Objects;
mus=findViewById(R.id.mus);
mySong = MediaPlayer.create(SudokuGame1.this,R.raw.dash);
mySong.setLooping(true);
}
// ...
public void onClick(View v) {
if(mus.isChecked()){
mySong.start();
}
else {
mySong.pause();
}
switch (v.getId()) {
case R.id.about_button:
Intent i = new Intent(this, About.class);
startActivity(i);
break;
// More buttons go here (if any) ...
case R.id.new_button:
openNewGameDialog();
break;
case R.id.exit_button:
finish();
break;
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.settings:
startActivity(new Intent(this, Prefs.class));
return true;
// More items go here (if any) ...
}
return false;
}
/** Ask the user what difficulty level they want */
private void openNewGameDialog() {
new AlertDialog.Builder(this)
.setTitle(R.string.new_game_title)
.setItems(R.array.difficulty,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialoginterface,
int i) {
startGame(i);
}
})
.show();
}
Functionality QA testers look for the generic problems within the game or its user
interface & graphics, such as game mechanic issues, stability issues, and game
asset integrity. User interface testing ensures user-friendliness of the game
Sound Testing: Testing if there is an error in loading the files, listening to sound
files for errors or distortions.
8. Future Enhancement
In Sudoku game better to raise in more complex cases, such as a more complicated
artificial intelligence game so that the algorithm used works more optimally. Likewise, the
layout and appearance of the user interface are more developed. At this writing, the writer
deliberately does not pay attention to the display interface because one of them is wanting to
show more algorithms that work in the system instead of highlighting the game itself. The
other suggestions for the next research are adding another algorithm as a comparison with the
backtracking algorithm in solving the same case or different cases and comparing the running
time and algorithm complexity of the two.
These are some of the main sugestions given by the user for improvement.
Instant help by giving hints and users progress while playing.
Score system based on time, accuracy and database to keep track of top ten record.
9. Conclusion
The Sudoku puzzle game application with backtracking algorithm has worked and is
running well.Games will always be the safe for people who want something refreshing to do
during their free time-to unwind and relax. Whether traditional or on the board or on
computer or mobile games there will always be a set of people crazy about games
10. Biblography
[1] M Schottlender 2014 The effect of guess choices on the efficiency of a backtracking
algorithm in a Sudoku solver Long Island Systems, Applications and Technology (LISAT)
Conference armingdale, NY, USA pp. 1–6.
[2] R Szabo 2014 Creation of the chips placement game with backtracking method in
Borland Pascal 11th International Symposium on Electronics and Telecommunications
(ISETC), Timisoara, Romania pp. 1–4.
10.1 References
[1] http://www.sudoku.sourceforge.net/
[2] https://www.sudokuwiki.org/sudoku.htm
[3] http://davidbau.com/archives/2006/09/04/sudoku_generator.html