Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help with Boggle Game?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mayaramamurthy




PostPosted: Sat May 19, 2012 4:53 pm   Post subject: Help with Boggle Game?

I need help with my game. Basically when a user enters a word and the program checks if that word can be found, my program is not able to do so.


boggle1.2.t
 Description:

Download
 Filename:  boggle1.2.t
 Filesize:  2.05 KB
 Downloaded:  73 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Amarylis




PostPosted: Sun May 20, 2012 11:27 am   Post subject: Re: Help with Boggle Game?

Turing:

        for e : 1 .. (lengthword - 1)
            for f : 0 .. 4
                for g : 0 .. 4
                    if table (f, g) = guess (e) then
                        row := f
                        col := g
                    elsif table (f, g) = guess (e + 1) then
                        row1 := f
                        col1 := g
                    end if
                end for
            end for
            xcoord := row1 - row
            ycoord := col1 - col


xcoord and ycoord in this case would only be applicable to the last and second last letters of the word if both letters are in the table

Try recording the xcoord and ycoord of each individual letter, then checking a letter relative to the previous one
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: