1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

sukodu

Discussion in 'Game programming' started by diya, Apr 4, 2006.

  1. diya

    diya New Member

    Joined:
    Apr 3, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    hi,
    i am prg to solve sukodu,
    this is what i have done uptil now
    Code:
    #include<iostream.h>
    #include<conio.h>
    #include<stdlib.h>
    #include<dos.h>
    
    
    int mat[20][20];
    int t,j;
    search(mat[][],i)
    {
    
    }
    void main()
    {
    	clrscr();
    	cout<<"Well come...to SUKODU";
    	delay(2000);
    
    	clrscr();
    	for(int i=1;i<=9;i++)
    	 {
    		cout<<"\n";
    		 for(j=1;j<=9;j++)
    		 {
    			mat[i][j]=  rand()%9+1;
    			cout<<" "<<mat[i][j];
    
    			 if(j==3||j==6)
    			cout<<"  ";
    			if(i==6&&j==9||i==3&&j==9)
    			{
    			cout<<"\n";
    			continue;
    			}
    		   }
    	    cout<<"\n";
    	 }
    getch();
    }
    output
    553 228 188

    556 827 241

    913 599 364


    428 155 599

    291 143 977

    461 927 222


    749 828 151

    784 379 592

    929 693 867




    now how do i remove duplicate enteries?????

    urgent help required
     
    Last edited by a moderator: Apr 4, 2006
  2. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    734
    Likes Received:
    37
    Trophy Points:
    0
    Do you mean Sudoku. Here are some thread which has the program [thread=541]Sudoku[/thread]
     
    Last edited: Apr 4, 2006
  3. codestorm

    codestorm New Member

    Joined:
    May 20, 2008
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    India
    Has anyone here made a GUI based game of Sudoku?
     
  4. reka20

    reka20 New Member

    Joined:
    Jul 31, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Wow, i haven't try that. maybe i will try to program it. If I'm able to solve the problem i will post it here..
     
  5. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    codestorm: try Simple Sudoku. Generates puzzles for you, and you can enter puzzles from teh intarweb, and does all the legwork of maintaining candidate lists, turning moderately complex sudokus from a frustrating exercise in keeping track of potential numbers back to the fun logic puzzle it was meant to be.
     
  6. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    OP: generating and solving sudokus are two completely different tasks. Probably best to work on a solver first, then once you've got the hang of that, turn the rules round to make a generator. You can generate them randomly, but it's probably more efficient in the long run to use the rules "backwards" to generate a puzzle.
     

Share This Page