Connect 4 validation


#1

Wrote a Go program to solve the Connect 4 community puzzle. Solves the four test cases, but only 3 of the validation tests. It fails on #1. I am positive my program is correct, yet it fails. How can this be? Here’s my code if you want to take a look:
http://play.golang.org/p/U8CFJBtBw-
It’s not the most elegant solution, but it works, mostly.


#2

Finished the Community puzzle Connect Four. I found that the validation is not consistent in reading a Carriage Return. I am using java. When the answer is two numbers, I use println() to display it. When the answer is “NONE”, I found that println(“NONE”) does not work. I have to change it to print(“NONE”) to pass.
Weird - that could be the reason for @Dogwon and some others to fail in some tests.


#3

Finally, after zillions of nanoseconds, an answer emerges from the gloom. I am overjoyed! My salvation is at hand!

Unfortunately, it didn’t help. With
` fmt.Println(“NONE”)

only validation test #1 fails. Changing the line to
` fmt.Print(“NONE”)

caused validation tests #1 and #4 to fail.

While I am grateful for the bit of light provided, it seems that I am still doomed to struggle in eternal darkness.


#4

Validators #1 und #2 fail. Is it still an issue with the carriage return and the ‘NONE’ answer or something else? I have tried to omit carriage return when outputting NONE (as java_coffee_cup suggested) but this doesn’t work. Anybody has an idea? Using Python3.


#5

Is this the right place to promote a connect4 multiplayer game by struct (before he deleted his account)?


#6

Hi eulerscheZahl, if this is a reply to my question: I’m sorry I don’t understand. I’m struggling with the puzzles, not yet tried anything with multiplayers


#7

Completely by coincidence, I solved the “Connect Four” solo puzzle yesterday.
I did not encounter any problem with validations or with the expected Carriage Returns in output.
Sending the right solution with two lines of either “NONE” or the space separated list of winning x positions, (both lines with trailing CR) passes all tests.