FIL - Five In Line

This command requires V3R7
 
 

This command lets you play the game of Five In Line, either against the AS/400, or against another person running a 5250 session on your AS/400. After one person has entered the FIL command, his opponent will be the next person to enter the FIL command

The algorithm the AS/400 uses to select it's move was taken from a Borland Turbo Pascal sample program more than 10 years ago, rewritten into AmigaBasic, later into RPG with it's onedimensional arrays, and after that Amiga C.


 
                                 Five-In-Line                                   
                                                                                
                . . . . . . . . . . . . . . . . . . .                           
                . . . . . . . . . . . . . . . . . . .                           
                . . . . . . . . . . . . . . . . . . .     Your score:      124  
                . . . . . . . . . . . . . . . . . . .                           
                . . . . . . . . . . . . . . . . . . .     AS/400  . :        0  
                . . . . . . . . . . . O . . . . . . .                           
                . . . . . . . . . . X X O . . . . . .                           
                . . . . . . . . . O . X . . . . . . .                           
                . . . . . . X . O . X X X O . . . . .                           
                . . . . . . . O O X O X X O . . . . .                           
                . . . . . . O . O X O X X X . . . . .                           
                . . . . . X . . X O X O O O O X . . .                           
                . . . . . . . . . . O . . . . . . . .                           
                . . . . . . . . . . . X . . . . . . .                           
                . . . . . . . . . . . . . . . . . . .                           
                . . . . . . . . . . . . . . . . . . .                           
                . . . . . . . . . . . . . . . . . . .                           
                . . . . . . . . . . . . . . . . . . .                           
                . . . . . . . . . . . . . . . . . . .                           
                                                                                
 F3=End Game   Use ENTER to set your X                                          
 You won !!  Press ENTER to start a new game                                    
This program is Freeware

Download (83 KB) Five In Line.

To install:

  • create an empty save file on your AS/400
  • start an ftp session and log on to you AS/400
  • set binary transfer mode with the bin ftp command
  • Unzip fil.zip using WinZip
  • put fil.sav to the save file you just created
  • restore all objects from the save file to the library of your choice, save library is UTLSYS
You're ready to play Five In Line!.

Note: The RPG source is too ugly to show to anyone, but if you're interested in the algorithm; drop me a line, and I'll send you the C source for the Amiga version

18th August 1999