Chess player: Difference between revisions

m
syntax highlighting fixup automation
(→‎{{libheader|python-chess}}: try to avoid mate in one)
m (syntax highlighting fixup automation)
Line 21:
 
Encontrado en: http://www.petesqbsite.com/sections/express/issue23/Tut_QB_Chess.txt
<langsyntaxhighlight lang=qbasic>DEFINT A-Z
 
DECLARE SUB SQUARE (A, B, C)
Line 496:
PRINT MT$
COLOR 7, 0
END SUB</langsyntaxhighlight>
 
 
Line 508:
some moves require history (the current state of the board is not sufficient for castling and en passant).
I also wanted to try different methods of making moves. It does not play well, but then neither do I.
<langsyntaxhighlight lang=perl>#!/usr/bin/perl
 
use strict;
Line 939:
then left click on the square the opponent's Pawn skipped over.
END
}</langsyntaxhighlight>
 
=={{header|Phix}}==
Line 963:
 
The computer may say some things that allude to the chess game in ''2001: A Space Odyssey'', by the way.
<langsyntaxhighlight lang=python># Simple Python chess engine
# Computer plays Black
 
Line 1,036:
 
print(f"Game finished, result is {board.result()}")
hal9000()</langsyntaxhighlight>
{{Output}} (in ASCII)
<pre>$ python3 simplechess.py
Line 1,107:
{{libheader|Wren-ioutil}}
{{libheader|Wren-str}}
<langsyntaxhighlight lang=ecmascript>import "/trait" for Stepped
import "/fmt" for Fmt
import "/ioutil" for Input, Output
Line 1,669:
}
 
Chess.start()</langsyntaxhighlight>
10,327

edits