Thanks. The info. you provided was just what I needed. Also, the
algorithm you outlined is just about exactly what I had in mind.
I wrote a 'quicky' program and it seems to work (more testing is
req'd. to be sure). I'd be happy to upload/share this program (after
fixing/cleaning it up). However, it was written in WinBatch (by
Wilson WindowWare - ref. www.windowware.com) so it can only be run by
someone that has it (& not too many do). If, by chance, we could get
access to a WinBatch compiler (@ $495 it's not practical to buy), we
could generate a stand-alone Windows (any 32-bit ver.) app.
I can rewrite the program in MATLAB (ref. www.mathworks.com), but
this results in much the same problem (ie., it could only be run by
someone with MATLAB). I DO have access to a MATLAB compiler that
(theoretically) could generate a stand-alone Windows app.
Unfortunatety (for me, not him), the local MATLAB mavin is on vac.
until 10-Sep. I'll talk to him then and keep you informed. Until
then, if you have an ideas let me know.
Harvey
--- In Lasertank@y..., "Jim Kindley" <jkindley@p...> wrote:
> Below are the headers for the records for both files.
>
> ==================================
> typedef char TPLAYFIELD [16][16]; // Matrix of G.O.
>
> typedef struct tLevel // Level Data from File
> {
> TPLAYFIELD PF; // Object Grid
> char LName[31]; // Level Name
> char Hint[256]; // Hint for this level
> char Author[31]; // the Author of the Level
> WORD SDiff; // Score Difficulty
> }TLEVEL;
>
> typedef struct tHSRec // High Score Record
> {
> WORD moves, shots;
> char name[6]; // Initials
> }THSREC;
>
> ==================
>
>
> Harvy, you are correct that the best way to compare the levels
would
> be to compare the playfield's. Here is how I would do the program.
> 1) scan Temp.hs for a score
> 2) if a score is found then load the level data from the Temp.lvl
file
> 3) then compare all 256 chars with each level in the lasertank.lvl
> file until a match is found.
> 4) when a match is found then load the LaserTank.hs file and check
to
> see which score is better.
> 5) if score from Temp.lvl is better then write over lasertank.lvl
> 6) Repeat for all of temp.lvl
>
> If you make this program please upload it and maybe the source code
> to this group when you are done.
>
> Jim
>
> P.S. if you need any code from me, Ask :)