realbasic-nug
[Top] [All Lists]

Re: Puzzle Creation

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Puzzle Creation
From: Tommy Single <thsingle4 at gmail dot com>
Date: Wed, 31 Aug 2005 20:42:56 -0400
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=tXFud7OSFiqIfQ9Jwkxa+VT47rlXmB5pdJEqr69pc8KLR+eO9ON5d6ITApwVI2uBhVY69gjQdOTGKd1tzmUO3rK8tUwwbPRgFXK5P+NZzhRqFT4lfoaeebhMdy63ZG40moAjb9g+XnZhH2Qvi2Fw0Tr3RS34XrVIqkqveIk/Iec=
References: <8b266a33ff627038047ecb4ec8cf84a1 at rpsystems dot net> <JNEMKODMMFHECCENBEECGECHHDAA dot rblists at rbtips dot com> <ea26a3e9050831173762e00335 at mail dot gmail dot com>
Hey List,
 I have an idea. I just want to know if you think this will work and how to 
code it.
 I'm thinking about making a two-dimensional array representing the 
different squares values. To create the values, I was thinking about using 
this code:
  
> Dim x,y,num,cnt as Integer
> x=1
> y=1
> num=1
> cnt=0
> Do
> number(x,y)=num
> If cnt < 9 then
> num=num+1
> x=x+1
> Else
> cnt=0
> num=1
> x=x+1
> End
> Loop Until x=9 and y=10

 Could that populate the array with values for all the squares? After this 
code, I would shuffle the array to randomize the numbers and then put some 
in the editfields.
 So basically, I'm asking for help on how to do this array thing, or for 
someone to tell me that it won't work. Any help appreciated.
 Tommy Single



On 8/31/05, Tommy Single <thsingle4 at gmail dot com> wrote: 
> 
> Hey, now that sounds like an idea! I like that. Thanks. O and thanks for 
> the links guys.
>  Tommy Single
> 
>  On 8/31/05, Carlos M <rblists at rbtips dot com> wrote: 
> > 
> > > Troy Rollins:
> > >
> > > On Aug 31, 2005, at 6:35 PM, Tommy Single wrote:
> > >
> > > > That makes since Troy. Thanks. I just thought about this, 
> > > editfields or
> > > > listbox???
> > >
> > > Probably editfields. Or a canvas – but that would be a
> > > whole additional
> > > challenge. Maybe do it with editfields first, and consider
> > > switching it 
> > > to a canvas once you can successfully generate puzzles.
> > >
> > 
> > You could use a plain box window or a sheet window and display it like
> > a contextual menu when the user clicks on one empty square - this
> > could have all numbers [1-9] or just the possible numbers (excluding
> > the numbers already on the row and column).
> > 
> > Carlos
> > 
> > _______________________________________________
> > Unsubscribe or switch delivery mode: 
> > <http://www.realsoftware.com/support/listmanager/>
> > 
> > Search the archives of this list here:
> > < http://support.realsoftware.com/listarchives/lists.html>
> > 
> 
>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
<Prev in Thread] Current Thread [Next in Thread>