Home  |  Introduction  |  Newsletters  |  Programs  |  Feedback

 

 

Search:

WWW

DelphiForFun.org

Support DFF

 If you benefit from the website,  in terms of knowledge, entertainment value, or something otherwise useful, consider making a donation via PayPal  to help defray the costs.  (No PayPal account necessary to donate via credit card.)  Transaction is secure.

If you shop at Amazon anyway,  consider using this link. 

     

We receive a few cents from each purchase.  Thanks

 

 

The index page for all Programs on the site?

The DFF Play CD?

Zipped file DFF Play CD.zip contains  executable version of about  75 of the 200+ programs from the site, mostly those I particularly liked or thought would be of widest interest for non-programmers.  The file is rather large, about 20mb..

Anything else?

 

Google
 

 

    

Search WWW

Search DelphiForFun.org

 

Not a programmer (yet)?

 That's OK -  the executable version for any puzzle or  game you find here is available for download.  Just scroll down to the bottom of most any description page and you'll find a "Download executable" link. Downloaded programs are in "zipped" format to reduce size and may require an "unzipper" program unless you are running Win XP or later.  Here's a link to a free one. 

Check  out  the Most Popular  Downloads from DFF   (updated weekly)

First time visitor?

Take a look at the Introduction page to see what this site is about

Notes for Teachers

 

October 20, 2007

 

Delphi For Fun Newsletter #47

 

Welcome to Autumn!  At least here in the mountains of southwest Virginia, the leaves are showing their full autumn splendor even though the temperatures are not as cool as we expect for this time of year.   This is my favorite season; temperatures are getting into the high 60's during the day and mid 40's overnight.  The skies are bright blue while the sun is in the sky and the sunsets are even more colorful than the leaves.     The winter's wood is all cut.  Deer season is only 3 weeks away, so it is time to start scouting the favorite hunting spots for sign.  The warm weather seems to have delayed the rut (mating season) this year, but it is bound to cool off and get them stirring soon.   Oh, and one more reason, we celebrated our 49th wedding anniversary a couple of days ago.  Life is good.

 

A few new programs and the usual batch of enhancements have been posted for the 3rd quarter of 2007.   Implementing computer play for the game of "Fox and Hounds", first posted in August. is still taking the hour or two spare hours I have each day.    I'm not working very hard on it, just enjoying the mental exercise.   At least that my excuse; I would hate to admit that old age is taking its toll!    

   

Here's a summary of the postings since last time:  

 

July 8, 2007:  It seems that there are an endless number of word problem variations.   Here's one from the my Mensa Puzzle Calendar for July 4:

Unscramble the letters in the box below and add the missing letter to make a nine-letter word.

A R U
I ? Y
N G R

I couldn't solve it on my own, but today's version of CrosswordHelper (aka WordCompletion) available as part of our WordStuff program will solve it now.  OK Mensa, "Bring 'em on!".  My wife says that it's cheating when I use one my programs to solve a puzzle, but I hold that it is just an extension of my brain, so it's legal.   That's my position and I'm sticking to it!

 July 12: 2007:  I posted a fix to Cutlist 3.4.1 yesterday to fix a printing problem for manually arranged solutions.  It turns out that if the solution display is scrolled down, the coordinates for the top of the first supply piece, which is no longer visible, gets a negative coordinate assigned reflecting that it is above the top of the visible area.    The Print procedure didn't take that into account.  It does now.  No one ever accused a computer of having common sense!

July 14, 2007: I'm working on two projects which require a checkerboard:  a Fox & Hounds game, and an update to Knight's Tour which quickly finds an example solution for any of the 1984 tours with unique starting and ending points.  While looking for existing programs on DFF with game boards, I ran across and fixed a small error in Gameboards -  Reversi  program.  The program illustrates three different game board styles, each of which allows the game of Reversi to be played.   Board 2 identified the loser of a game as the winner;  a small problem unless you happen to be the winner!    

 

 

 

July 25, 2007:  Here is a basic game of Checkers for human players.  The program just handles the moving and scoring, no computer play yet.   The primary motivation for the project is  for use in the projects mentioned last week, but I decided to implement the set of rules for the "American" version of checkers "just for fun".  

Version 2.1 was posted this afternoon, adding an "Undo" function implemented as a debugging aid.  It might also be useful to players studying game strategies.  If you happened to download the program this morning (Version 2.0) consider downloading it again.
 

 

We will be heading out in a few days  to attend the 50th reunion of my high school "Class of '57".   It should be interesting, even if it turns out to be with a bunch of old folks with failing memories.  I'll fit right in!   Current projects including another Knight's Tour investigation, a version of Mastermind called "Cows and Bulls", a Fox & Hounds solver,   and a couple of others will have to wait a while longer.  

 

August 3, 2007:  Fox & Hounds is a game played on a checkerboard where 4 "Hounds" (regular checkers) try to corner the "Fox" (a king checker) before he can get past the Hounds.  No jumping or taking of pieces allowed.  I'm trying to confirm a viewer's suggestion that the Hounds always have a winning strategy, but no luck so far.  This is a playable version of the game to solicit help from viewers while I work on Delphi code to prove or disprove the hypothesis.
 

August 8, 2007:  Version 4 of our ArrangeListBox program was posted in the Delphi_Techniques section today.  It adds the ability to move a selected block of item in a single drag operation.  

August 9, 2007:  It didn't take long to realize that last week's posting of Fox & Hounds lacked a needed feature - a way to save and reload moves and board positions for future study or sharing.  Version 2.1 posted today adds that ability.  

August 10, 2007:  Another small fix-up today.  The  Crossword Helper word completion program in Wordstuff2 word puzzle solver suite was enhanced last month to include an anagram feature.  Either then or some time earlier, the ability to specify letters to be excluded from solutions stopped working.  It is now working again.

August 19, 2007:  The integer 1210 has the property that it contains 1 zero, 2 ones, 1 two, and 0 threes.  So each position of the number contains the number of digits with that position number if we number the positions starting from zero.   Self Describing Numbers  searches for such integers. (Out of 10 billion possibilities, there are only 7.)

August 31, 2007:  I've started fall woodcutting but warm afternoons  still provide an excuse to spend a few hours most days to work (my wife says "play") on the computer.    The past couple of weeks I've spent most of those hours on Bitmap Chunks, an investigation into efficiently scanning a bitmap file to  find connected pieces of the image.  I may have developed an algorithm that will do the job.   Along the way I managed side trips into color lookup tables, pixel formats, palettes, RGB and HSB color coding, ClearType display technology, magnifying an image and a few other areas.  Altogether, the project provided many hours of enjoyable brain exercise.   

September 1, 2007:  In the ongoing search for a winning strategy for the Hounds, Fox and Hounds Version 2.3 posted today allows the user to select who moves first.  Perhaps being able to have the first move is just the advantage that they need! 

 

B1 is one of the 32 ending positions for tours starting in A1

September 14, 2007:   A few weeks ago a viewer asked if there was a knight's tour for each starting and ending combination on an 8x8 chessboard.  A new Knight's Tour program AllKnightsTours was posted today.  It finds a sample of all 2048 valid combinations of starting and ending tour locations.

 A Knight's Tour is a sequence of knight moves that visits every square on the board.   There are 64 starting locations with 32 ending locations for each (those of opposite color).  64x32=2048.   
September 24, 2007: 
Cows and Bulls posted today is a game which is similar to, but predates, Pressman Toy Company's "Mastermind" game.   In Mastermind, a "Hider" defines a hidden pattern of colored pegs which the the "Seeker" attempts to find  by making successive guesses with feedback after each guess.  In Cows and Bulls, the pegs are replaced by the digits 0-9 and the feedback consists of the number of guess digits which appear in their proper place in the hidden number (these are the Bulls), and the number of digits which appear in the hidden pattern but are in the wrong position (the Cows).    The program posted today, like my earlier Mastermind program allows either the human or the program to be the Hider or the Seeker.

 

October 12, 2007:  Version 3 of our Crossword Generator was posted today.  It enhances puzzle generation by centering the initial word and trying up to 1000 random puzzles in order fit the number of words requested.

The puzzle at left  (generated from sample file Continents.txt),  includes all 7 continents.  It was generated on the 10th attempt using "extended search" and would likely not have been found by the previous version . 
 

 

October 16, 2007:   A viewer recently wrote asking to clarify a problem he was having determining the coordinates where a line from the center of a rectangle at a given angle would exit the rectangle.  Since I'm currently semi-stuck on a more complicated project, it seemed to be a good excuse to take a break and do something simpler.  Ray  Intersecting Rectangle is my attempt to help Joe with his problem and re-boost my confidence that I can  get something to work at least!
 

October 17,2007: Here is a utility program, HexView, whose sole job is to display the contents of any file.  Computer memory and files consist of binary data (bits) which are generally handled in 8 bit chunks called bytes.     Since most of the 256 possible byte values do not have unique display characters assigned, a hexadecimal (base 16, 4 bits per hex digit)  display is a nice compact way to show all of the data in a file.   Two hexadecimal digits can exactly represent any byte. 

 


 

Gary Darby

http://www.delphiforfun.org/


"Talent is cheaper than table salt. What separates the talented individual from the successful one is a lot of hard work." -- Stephen King , Novelist  

 

"Someone once asked me what I want on my epitaph when I pass away. Just the words 'I tried.' That's what this game of life is all about. Trying. " -- Mickey Rooney, Actor


 

To subscribe or unsubscribe from this newsletter, visit http://delphiforfun.org/newsletter.htm

 

212,432 home page visitors since Sept 2000.      437,050 program downloads in the past 12 months!