Morpion solitaire/Unicon: Difference between revisions
Content added Content deleted
m (→Strategy Support: comment) |
(→Main and Core Game Play Procedures: make basic vs. extended framework clearer) |
||
Line 28: | Line 28: | ||
$define MORPVER "1.7f" # version |
$define MORPVER "1.7f" # version |
||
$define EXTENDED 1 # comment for basic version |
|||
procedure main(A) # Morphion |
procedure main(A) # Morphion |
||
$ifdef EXTENDED |
|||
MorpionConf(A) |
|||
MorpionConf(A) # conf extended version |
|||
if \M_ReplayFile then ReplayMorpion() |
if \M_ReplayFile then ReplayMorpion() |
||
else if \M_Limit === 1 then ShowGame(SingleMorpion()) |
else if \M_Limit === 1 then ShowGame(SingleMorpion()) |
||
else MultiMorphion(\M_Limit) |
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 |
end |
||
$define XEMPTY "." |
$define XEMPTY "." # symbols used in Grid |
||
$define XINIT "*" |
$define XINIT "*" |
||
$define XUSED "+" |
$define XUSED "+" |
||
$define DHOR "-" |
$define DHOR "-" # Directions for moves |
||
$define DVER "|" |
$define DVER "|" |
||
$define DRD "\\" |
$define DRD "\\" |
||
$define DLD "/" |
$define DLD "/" |
||
$define DALL "-|/\\" |
$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 |
record morpiongame(grid,score, # the grid & score |