Mastermind - now on disk (plus editor)

Discussion, Reviews & High-scores

Moderator: Moderators

Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Here is a type-in upgrade for you. Making it accept misspelled answers:

Code: Select all

1390 IFA$<>A1$THEN1402
1400 PRINT"{BLK}{DOWN}        CORRECT{BLU}"
1401 S(I,1)=S(I,1)+1:K=S(I,1):GOSUB980:P1=P1+1:GOTO1420
1402 IFLEFT$(A$,4)="THE "THENA$=RIGHT$(A$,LEN(A$)-4):GOTO1390
1403 Z$=A1$:IFVAL(Z$)>0ORVAL(Z$)<0THEN1410
1404 IFLEN(Z$)>LEN(A$)THENA$=A$+" ":GOTO1404
1405 IFLEN(Z$)<LEN(A$)THENZ$=Z$+" ":GOTO1405
1406 GOSUB2000:IFZR=1THEN1401
1407 A$=A$+" ":Z$=" "+Z$:GOSUB2000:IFZR=1THEN1401
1408 A$="  "+A$:Z$=Z$+"  ":GOSUB2000:IFZR=1THEN1401

2000 ZC=0:ZR=0:FORZ2=1TOLEN(Z$):IFMID$(Z$,Z2,1)=MID$(A$,Z2,1)THENZC=ZC+1
2010 NEXTZ2:IFZC/LEN(Z$)>.65THENZR=1:PRINT"{BLK}{DOWN}CORRECT BUT MISSPELLED ("A1$"){BLU}"
2020 RETURN
In line 1407 " " is ONE space. In line 1408 " " is TWO spaces.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
vicist
Vic 20 Afficionado
Posts: 352
Joined: Tue Oct 09, 2012 5:26 am
Location: Sheffield, UK

Post by vicist »

Cheers Boray.

Tried it out and, on the whole, works very well. I deliberately spelt things a little wrong and it picked up most of the mistakes. Not so good if getting somebody's name wrong however ie: 'Flecher' instead of 'Fletcher'.

I appreciate that it is never going to be perfect in this respect, but many thanks for your efforts to make the game a bit more satisfying to play. :D
Last edited by vicist on Thu Aug 20, 2015 6:13 am, edited 1 time in total.
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

You are welcome to include it if you like, but then it's probably a good idea to include two versions, one close to the original and one with this hack. Please DON'T mention me anywhere in case some old mad copyright holder turns up. :)
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
User avatar
vicist
Vic 20 Afficionado
Posts: 352
Joined: Tue Oct 09, 2012 5:26 am
Location: Sheffield, UK

Re: Mastermind - now on disk (plus editor)

Post by vicist »

There were a few bugs in the editor program which I have now fixed.

You can download the new file direct from the original post instead of going to my website to find it. :)
Post Reply