Scrabble logic

Ive been thinking recently about building a scrabble type board game. Ive searched the web for some of the logic that might go into making such a game, but havent been able to find much. I was wondering if anyone might have some psuedo code or suggestions on where to get started? [import]uid: 28912 topic_id: 9949 reply_id: 309949[/import]

Examples? anyone? [import]uid: 28912 topic_id: 9949 reply_id: 36705[/import]

@HavocHare,
if you are looking for code and direction, then I guess you have bitten too much, it is a very ambitious project that you want to undertake.

why do you not try to approach this in bits.

  1. Create a tile rack and randomly distribute 7 tiles
    what you will learn from this is how to manage the tiles on rack, on board and in the bag. Make the tiles moveable on the rack and discardable as if you were putting them on the board and then filling in with exactly the number of discarded tiles.

This will be a good exercise for you tot start with before you attempt the board, scoring and dictionaries, etc

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 9949 reply_id: 36727[/import]

Well, I took youre advice, and started with the bag, then to the tile bar. And am happy to say it is seemingly working pretty well. I also have the board done, and a way to find “words” on the board. I say “words”, as I have yet to tackle the dictionary/word validation part of the program. Any suggestions or direction, on where to go from here would be appreciated. [import]uid: 28912 topic_id: 9949 reply_id: 37879[/import]

For validating words first get a good word list to check against. Here are the official Scrabble ones (there are different lists for different tournaments:) http://www.isc.ro/en/commands/lists.html

When a player plays a word check if it’s on the list to validate it. It’ll take a little time to check but that pause is fine in a board game (as opposed to a fast action game or something.) [import]uid: 12108 topic_id: 9949 reply_id: 38095[/import]

Thanks for the link, Ive been using the twl06… might switch to sowpods at some point though. Ive got my word validator working pretty well at the moment, Im currently trying to come up with a method to make sure there are no rogue words on the board… ie. making sure all words play off eachother/touch eachother. [import]uid: 28912 topic_id: 9949 reply_id: 38160[/import]

interesting thread… I just so happen to be working on a similar project. yes, it is ‘like’ scrabble but different. I have a complete working board that handles tile movement correctly, but I haven’t quite figured out how to check spelling of placed tiles yet. Would you be willing to share some info on how you accomplished this? [import]uid: 50005 topic_id: 9949 reply_id: 38670[/import]

. [import]uid: 28912 topic_id: 9949 reply_id: 38750[/import]

I thought I had my tile movement and whatnot working well, but its actually turned out to be be very glitchy. As far as checking words. Basically what I did, was for every location a tile can be set, there is an invisible object at the location. When a tile is set there, the invisible object takes on the properties of the tile, like its letter… or score. Then when the user submits the word, I look thru all the invisible objects, decipher which objects have been filled with the properties of a tile, take those properties(letters) and check them against a word dictionary. [import]uid: 28912 topic_id: 9949 reply_id: 38830[/import]