Well I don't exactly have the code, but it's not necessary for me to provide any at this moment.
The problem is I have a JScrollPane, and we all known it has a scrollbar if there is too much text to...
Type: Posts; User: MysticDeath
Well I don't exactly have the code, but it's not necessary for me to provide any at this moment.
The problem is I have a JScrollPane, and we all known it has a scrollbar if there is too much text to...
=S, well the way I programmed it... gah.
Here are my files. I already have a newboard or sudoku board two dimensional array.
public class GetDataMethods {
int emptycells[];
int rows[]=new...
Well I've been working on a Sudoku Solver. I ran into a problem;
This is a typical Sudoku:
http://i166.photobucket.com/albums/u88/Jaker545/gene.jpg
So here's my problem;
In my code, the way I'm...
No, not really.
The harder ones take more time :)
I'd rather use the simple logic, although idk.
Do you know what is causing the null pointer exception though?:-t
Oh an my null pointer error:...
Yea, But there's something wrong:
I keep getting a Null Pointer Exception;
When I have the following files:
import java.util.ArrayList;
public class runprogram {
ArrayList arrayList =...
Ok well here's what I mean:
Every cell in the sudoku puzzle has possible values;
As in
Say we have part of a puzzle
1 2 3 _ _ _
4 5 6 1 _ _
7 8 9 _ _ x
the x can't have 7 8 9 as...
Alright, well so far that sounds good.
I'll modify my program and adjust it to fit what you said.
However, how would you approach removing and adding possible values.
Oh good point.
Well this project is supposed to be completely different in the end, It will load the sudoku from a file, and I was thinking perhaps first it should be in an array, then the array...
Oh I don't know if you know, but I have another file representing the whole board.
Why the two dimensional array?
EDIT:
Oh wait you are referring to the 3*3 portion of a board?
I was hoping to...
Well I'm writing this for fun, no it's not homework.
So anyway, it's basically a Sudoku Solver.
I intend to have it solve a Sudoku by finding obvious pairs;
As in naked pairs : Solving Sudoku...
Never mind I solved it;
Remove the decleration of Cell in the file were the objects are created, then simply in the runprogram declare a new instance of the class, and call the method assignvalues.
Well I just started coding in Java with seperate files and classes, and I believe this is an organization problem;
SOOOO I have 3 files:
All have 1 class and methods.
Here's one
public...
Yeah.
I wasn't sure how to initialize the variable, so thanks :-D.
I'll post back once I fix this, and I'll post my sol.
Gah:
Well you can't see the sol, because you just gave me the sol....
Well I'm not sure how to program this, but anyway, I need to make 81 objects and assign their value (int value).
So My Class is:
public class Cell {
int value;
int xloc;
int yloc;
int...
Jason I love you ;).
It works, and I'm reading the post you linked.
I did that;
What i get as output,then error:
0
0
0
0
6
0
0
0
That's why we have Eclipse;
Keeps a copy of each file in your "workspace" folder. =\
Great coding environment if you didn't know btw.
This isn't homework, I'm only in 8th grade my school doesn't have java courses before you ask)<--
Well I ran into a funny little problem, not quite sure how I should approach it;
Well I have a...
Oh thanks, that's what I was getting wrong..
Yes this was what I meant to do.
Thank you!
Well I made myself a nice MultiDimensional array:
int[][] newboard = {{0,0,0,0,6,0,0,0,9},
{0,6,0,0,0,0,3,0,1},
{2,0,0,0,0,9,8,0,0},
...
LOL.
Well I've found several websites demonstrating how the approach to brute force a solution should look like, so I'm testing it right now on a 3*3 mini sudoku. >:)
Brute force you say?
Alright I'll look into that.
And I'll look at the sudoku solver by logic.
Any more ideas/hints?
Well here's my challenge:
Make a sudoku solver.To be honest, I don't know were to begin. I just need a general idea of the most efficient way to have my program solve it. So should I make it search...
Well here's basically what I'm trying to accomplish.
I'm trying to write a program that when run on two computers, both can send messages and the messages will appear on each one of the computers....
Java is a bad language to write this in.
Well not bad, but like everyone said, there is a better language.