Sudoku (Programmed Game Using C++)


Foremost, we would like to express our sincere gratitude to our advisor Ms. Marissa Chua for the continuous support in our case study and research, for her patience, motivation, enthusiasm, and immense knowledge. Her guidance helped us in all the time of research and writing of this case study. We could not have imagined having a better professor for our case study.

Besides our professor, we would like to thank the rest of our friends for their encouragement, insightful comments, and tease. Our sincere thanks also goes to Mrs. Marilyn Lustre for offering us their home as a working place for our case study. We also thank our fellow classmates in CS124: BSCS 1y2-1, for the stimulating discussions and for the fun we have had in the past 4 months. Last but not the least; we would like to thank our family: our parents for giving birth to us at the first place and supporting us spiritually throughout our lives.


Table of ContentsTitle PageiAcknowledgementiiTable of ContentsiiiIntroduction1Objectives2System Flow3User’s Manual4List of Commands5Source Code6Screen Shots7Curriculum Vitae8References9


Sudoku is a logic-based combinatorial number-placement puzzle. The objective is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 sub-grids that compose the contains all of the digits from 1 to 9. The puzzle setter provides a partially completed grid, which typically has a unique solution.


The objective of sudoku is to enter a digit from 1 through 9 in each cell using turbo c++ , in such a way that: * Each horizontal row (shown in pink) contains each digit exactly once * Each vertical column (shown in yellow) contains each digit exactly once * Each subgrid or region (shown in green) contains each digit exactly once This explains the name of the game; in Japanese, Sudoku means something like “numbers singly”.

Solving a sudoku puzzle does not require knowledge of mathematics; simple logic suffices. (Instead of digits, other symbols can be used, e.g. letters, as long as there are ninedifferent symbols.) In each sudoku puzzle, several digits have already been entered (the “givens”); these may not be changed. The puzzler’s job is to fill the remainder of the grid with digits –respecting, of course, the three constraints mentioned earlier.

A “good” sudoku puzzle has only one solution.

List of Commands

#include <graphics.h>#include <stdio.h>#include <conio.h>#include <stdlib.h>#include <dos.h>#define _LEFT 120#define _TOP 100#define _WIDTH 40#define _HEIGHT 35#define xBlockSpace 5#define yBlockSpace 5#define fixedBlockFillColor RED#define fixedTextColor GREEN#define BlockFillColor1 LIGHTBLUE#define BlockFillColor2 GREEN#define playerTextColor RED#define SudokuTableColor GREEN#define BlockLineColor BLUE#define activeBlockLineColor CYAN#define UP_ARROW 72#define DOWN_ARROW 80#define LEFT_ARROW 75#define RIGHT_ARROW 77#define F2 60#define F3 61#define AND &&#define YA ||#define TRUE 1#define FALSE 0

ReferencesGoogle ( (