Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: 8 queens problem meets obfuscated C programming

Author: Russell Reagan

Date: 08:02:35 04/10/03

Go up one level in this thread


On April 10, 2003 at 07:16:31, Omid David Tabibi wrote:

>Now the output is clear, e.g.:
>
>#######
>### ####
> #######
>## #####
>##### ##
># ######
>###### #
>#### ###

The original code had the entire for loop on one line, and it worked correctly,
putting 'Q' where each queen is supposed to be, and '#' represented dark
squares, while spaces represented light squares. I guess posting it here added
in a newline or something that altered the functionality of the code. Here's an
example of the output I get.

 # # # Q
# Q # #
Q# # # #
# # #Q#
 Q # # #
# # Q #
 # # #Q#
# #Q# #

 # # # Q
# #Q# #
Q# # # #
# Q # #
 # # Q #
#Q# # #
 # # #Q#
# # Q #

To see the version I have, that works correctly, you can go here:
http://home.attbi.com/~rreagan/8queens.c



This page took 0.01 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.