Morpion solitaire/Unicon: Difference between revisions

→‎Main and Core Game Play Procedures: make basic vs. extended framework clearer
(→‎Main and Core Game Play Procedures: make basic vs. extended framework clearer)
Line 28:
 
$define MORPVER "1.7f" # version
$define EXTENDED 1 # comment for basic version
 
procedure main(A) # Morphion
$ifdef EXTENDED
MorpionConf(A)
MorpionConf(A) # conf extended version
if \M_ReplayFile then ReplayMorpion()
else if \M_Limit === 1 then ShowGame(SingleMorpion())
else MultiMorphion(\M_Limit)
$else
printf("--- Morpion Solitaire 5 (v%s) (single game/random/5T/pentasol logging)---\n\n",MORPVER)
M_Strategy := RandomPlayer
M_Mvalid := ValidMove5T
M_WriteGame := WriteMoveLogPS
M_Output := &output
ShowGame(SingleMorpion())
$endif
end
 
$define XEMPTY "." # symbols used in Grid
$define XINIT "*"
$define XUSED "+"
$define DHOR "-" # Directions for moves
$define DVER "|"
$define DRD "\\"
$define DLD "/"
$define DALL "-|/\\"
 
global M_Strategy,M_Mvalid # Pluggable procedures
global M_Output # output files
global M_WriteGame # for logger
record morpiongame(grid,score, # the grid & score
Anonymous user