home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!natinst.com!news.dell.com!texsun!cronkite.Central.Sun.COM!west.West.Sun.COM!rubio!tamber
- From: tamber@rubio.West.Sun.COM (Tom Amber SUN Tucson CSD-Kodak 602-577-5207)
- Newsgroups: comp.lang.pascal
- Subject: Chess Puzzle
- Message-ID: <1dp5hbINNbu4@west.West.Sun.COM>
- Date: 10 Nov 92 20:19:55 GMT
- Reply-To: tamber@rubio.West.Sun.COM
- Organization: Sun Microsystems
- Lines: 13
- NNTP-Posting-Host: rubio.west.sun.com
-
-
-
- Keywords:
-
- This is my first posting to this group, so I hope it even gets there, here goes!
- I'm trying to work out a solution to the "Eight Queens" chess problem whereby you
- try to place 8 queens on a chessboard in such a way that no one queen can get
- another queen. I've seen a solution to this problem using the "Icon" language but
- I,m interrested in a Pascal solution. I figure 2 arrays [1..8] can represent the
- chessboard and I've worked out a procedure on how to make a horizontal,vertical and
- both diagonals un-usable upon placement of a queen. The problem is in a recursive
- procedure to keep trying the next placement and so on. Anybody have any clues or
- has anyone seen this before. Steer me in the right direction!!!
-