Jump to content

Morpion solitaire: Difference between revisions

m
→‎{{header|REXX}}: added a link to the LINESIZE.REX program.
m (→‎{{header|REXX}}: added a link to the LINESIZE.REX program.)
Line 561:
oFID=oFID'.LOG' /*fulltype for the LOG's filename*/
prompt='enter X,Y point and an optional character for placing on board',
'(or Quit):'; prompt=right(prompt,79sw,'─') /*right justify it.*/
call GreekCross
jshots=Gshots
Line 654:
end /*y*/
 
if wins==0 then call t copies('═',79sw)
else call t right('count of (above) wins =' wins,79sw,'═')
call t
return
Line 729:
x=xx
do y=yy-1 by -1; x=x+1; if @.x.y==empty then leave; z=z||@.x.y; end
return eureka+countAline(z) /*───────count diag wins: up&<, down&> */</lang>
This REXX program makes use of &nbsp; '''LINESIZE''' &nbsp; REXX program (or BIF) which is used to determine the screen width (or linesize) of the terminal (console).
<br>The &nbsp; '''LINESIZE.REX''' &nbsp; REXX program is included here ──► [[LINESIZE.REX]].<br>
</lang>
 
'''output''' when running 1,500 trials, the highest win was a meager 44 (four games, all different), and
one of them is shown below.
<pre style="height:100ex;overflow:scroll">
·╞···╔══╗···
·|···║··║···
Cookies help us deliver our services. By using our services, you agree to our use of cookies.