Fernando Madruga
Starting to like KiXtart
Registered: 2002-08-21
Posts: 149
Loc: Coimbra.Portugal.Europe.Earth....
|
You're {edit} half {/edit} right...
1st, the code DOES work in 4.11 RC 1 (the one I'm using) (wait a sec...) Just cheking under 4.10 and yes, it does work here!
code:
[d:\work\admin\kixtart\kix 2001 - 4.10]KIX32.EXE anagram_test.kix
feeling fleeing snooped spooned last salt slat ablest bleats stable tables UDF passed regular input array test admirer married aphrodite atrophied perseus peruses filets itself stifle hoes hose shoe ladder larded raddle filters lifters stifler trifles parental parlante paternal prenatal portes poster presto repost UDF passed another regular input array test UDF passed empty input array test UDF passed empty input string test UDF passed no anagram input array test The Anagram() UDF passed validation kix32 Kixgolf3.kix $f=anagram_test.kix
KixGolf v3.0.2 score = 454
I'd sugest copying the latest KixGolf (3.0.2) {edit} 3.0.3 {/edit} and using that instead.
As for not working with more than 10 anagrams, that is not true. I tried with these input:
code:
$inputarray='a1,1a,a2,2a,a3,3a,a4,4a,a5,5a,a6,6a,a7,7a,a8,8a,a9,9a,hack,snooped,tables, salt,spiff,feeling,spooned,last,grep,bleats,gas,ablest,fleeing,stable,slat,drive' $correctoutput='1a a1,2a a2,3a a3,4a a4,5a a5,6a a6,7a a7,8a a8,9a a9,feeling fleeing, snooped spooned,last salt slat,ablest bleats stable tables'
(sorry for the long lines...) {edit} I added some breaks into the big lines, just reassemble them when you copy/paste! {/edit}
and it turned out like this:
code:
1a a1 2a a2 3a a3 4a a4 5a a5 6a a6 7a a7 8a a8 9a a9 feeling fleeing snooped spooned last salt slat ablest bleats stable tables UDF passed regular input array test admirer married aphrodite atrophied perseus peruses filets itself stifle hoes hose shoe ladder larded raddle filters lifters stifler trifles parental parlante paternal prenatal portes poster presto repost UDF passed another regular input array test UDF passed empty input array test UDF passed empty input string test UDF passed no anagram input array test The Anagram() UDF passed validation kix32 Kixgolf3.kix $f=anagram_test.kix
KixGolf v3.0.2 score = 454
So I guess it DOES work with more than 10...
It does not work with anagrams returning more than 10 words (that's the purpose of $d - count the words in the anagram to be returned) so as to sort the results by number of words 1st)
And because that could happen quote: Each set of anagrams will not exceed 15 words per anagram
I decided to make a test case for that too:
code:
$inputarray='0123456789abcdef,123456789abcdef0,23456789abcdef01,3456789abcdef012, 456789abcdef0123,56789abcdef01234,6789abcdef012345,789abcdef0123456,89abcdef01234567, 9abcdef012345678,admirer,parental,whatever,trifles,repost,kixtart,raddle,lifters,tartkiz, atrophied,filters,warez,perseus,paternal,married,with,children,larded,hoes,poster,hose, filets,prenatal,parlante,itself,stifler,aphrodite,stifle,portes,shoe,ladder,peruses,presto' $correctoutput='admirer married,aphrodite atrophied,perseus peruses,filets itself stifle, hoes hose shoe,ladder larded raddle,filters lifters stifler trifles, parental parlante paternal prenatal,portes poster presto repost,0123456789abcdef 123456789abcdef0 23456789abcdef01 3456789abcdef012 456789abcdef0123 56789abcdef01234 6789abcdef012345 789abcdef0123456 89abcdef01234567 9abcdef012345678';
{edit} same as above... {/edit} And, as you said, it won't work on this one...
In that case, the code has to go "back" to a previous state with a score of 460 by sealeopard... And in this one, I can't cut any more bytes...
Later, Madruga
But that does give me another idea for KixGolf 3.0.3... Be back soon... [ 24. August 2002, 14:29: Message edited by: Fernando Madruga ]
_________________________
Later,
[b]Mad[/b]ruga
|