Jump to content

Peaceful chess queen armies: Difference between revisions

Line 2,584:
=={{header|Fortran}}==
{{works with|gfortran|11.2.1}}
 
The example demonstrates modern Fortran’s capabilities for integer bit manipulation, using large machine integers (and their entire bitrange) as bitmaps to represent queen armies. Complicated (but nevertheless single-statement) expressions of such integers represent such operations as rotating a chessboard and checking for any attacks.
 
There are two Fortran programs and a driver script. One program generates a Fortran module for basic operations; the other program (which must be linked with the generated module) does the actual work. The driver script is for Unix shell.
 
1,448

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.