Skip to content

Instantly share code, notes, and snippets.

@icequeenzz
Created October 2, 2010 22:19
Show Gist options
  • Save icequeenzz/608046 to your computer and use it in GitHub Desktop.
Save icequeenzz/608046 to your computer and use it in GitHub Desktop.
public boolean save(Puzzel p)
{
String insertPuzzel = "insert into Orders values(" + p.getNr() + p.getAantalKolommen() + p.getAantalRijen() + ")";
String insertWoord;
Iterator<Woord> WoordenHorizontaal = p.getHorizontaleWoorden();
Iterator<Woord> WoordenVertikaal = p.getVertikaleWoorden();
// excetute puzzel query
// loop trough woorden horizontaal
while(WoordenHorizontaal.hasNext())
{
Woord w = WoordenHorizontaal.next();
insertWoord = "insert into Orders values(" + p.getNr() + w.getTekst() + w.getBeginkolom() + w.getBeginrij() + w.GetWoordLength() + "horizontaal" + ")";
}
// loop trough woorden verticaal
while(WoordenVertikaal.hasNext())
{
Woord w = WoordenHorizontaal.next();
insertWoord = "insert into Orders values(" + p.getNr() + w.getTekst() + w.getBeginkolom() + w.getBeginrij() + w.GetWoordLength() + "verticaal" + ")";
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment