// simple_chess.c // Minimal local 2-player chess (console). // Compile: i686-w64-mingw32-gcc simple_chess.c -o simple_chess.exe // or for 64-bit: x86_64-w64-mingw32-gcc simple_chess.c -o simple_chess64.exe #include <stdio.h> #include <string.h> #include <ctype.h> char board[8][8]; void init_board() { const char *r0 = "rnbqkbnr"; const char *r1 = "pppppppp"; const char *r6 = "PPPPPPPP"; const char *r7 = "RNBQKBNR"; for (int c=0;c<8;c++){ board[0][c]=r0[c]; board[1][c]=r1[c]; board[6][c]=r6[c]; board[7][c]=r7[c]; } for (int r=2;r<=5;r++) for (int c=0;c<8;c++) board[r][c]='.'; } void print_board(){ for(int r=0;r<8;r++){ for(int c=0;c<8;c++){ } } } int in_bounds(int r,int c){ return r>=0 && r<8 && c>=0 && c<8; } int is_white(char p){ return p>='A' && p<='Z'; } int is_black(char p){ return p>='a' && p<='z'; } int empty_sq(char p){ return p=='.'; } int path_clear(int sr,int sc,int dr,int dc){ int drs = (dr>sr) ? 1 : (dr<sr ? -1 : 0); int dcs = (dc>sc) ? 1 : (dc<sc ? -1 : 0); int r = sr+drs, c = sc+dcs; while(r!=dr || c!=dc){ if(!in_bounds(r,c)) return 0; if(!empty_sq(board[r][c])) return 0; r+=drs; c+=dcs; } return 1; } int valid_move_piece(char piece,int sr,int sc,int dr,int dc,int whiteTurn){ if(!in_bounds(sr,sc) || !in_bounds(dr,dc)) return 0; if(sr==dr && sc==dc) return 0; char dst = board[dr][dc]; if(!empty_sq(dst)){ if(whiteTurn && is_white(dst)) return 0; if(!whiteTurn && is_black(dst)) return 0; } char p = piece; int dir = whiteTurn ? -1 : 1; // white moves "up" the board (lower index rows) case 'p': { // pawn if(sc==dc){ // forward moves if(dr == sr + dir && empty_sq(dst)) return 1; // double step from starting rank if( (whiteTurn && sr==6 && dr==4) || (!whiteTurn && sr==1 && dr==3) ){ if(empty_sq(board[sr+dir][sc]) && empty_sq(board[dr][dc])) return 1; } return 1; // capture } return 0; } case 'r': { if(sr==dr || sc==dc) return path_clear(sr,sc,dr,dc); return 0; } case 'n': { return ( (drd==2 && dcd==1) || (drd==1 && dcd==2) ); } case 'b': { return 0; } case 'q': { if(sr==dr || sc==dc) return path_clear(sr,sc,dr,dc); return 0; } case 'k': { return 0; } } return 0; } int parse_coord(const char *s,int *r,int *c){ // expects fileletter rankdigit e.g. e2 char rk = s[1]; if(f<'a' || f>'h' || rk<'1' || rk>'8') return 0; *c = f - 'a'; *r = 8 - (rk - '0'); return 1; } int make_move(int sr,int sc,int dr,int dc,int whiteTurn){ char piece = board[sr][sc]; if(piece=='.') return 0; if(whiteTurn && !is_white(piece)) return 0; if(!whiteTurn && !is_black(piece)) return 0; if(!valid_move_piece(piece,sr,sc,dr,dc,whiteTurn)) return 0; // perform move board[dr][dc] = board[sr][sc]; board[sr][sc] = '.'; // pawn promotion (to queen) if reaches last rank if( (is_white(board[dr][dc]) && dr==0) || (is_black(board[dr][dc]) && dr==7) ){ board[dr][dc] = is_white(board[dr][dc]) ? 'Q' : 'q'; } } return 1; } int main(){ init_board(); char input[64]; int whiteTurn = 1; // white starts while(1){ print_board(); // trim newline // allow formats: e2e4 or e2 e4 char sfrom[8], sto[8]; sfrom[0]=input[0]; sfrom[1]=input[1]; sfrom[2]=0; sto[0]=input[2]; sto[1]=input[3]; sto[2]=0; } else { } } int sr,sc,dr,dc; if(!parse_coord(sfrom,&sr,&sc) || !parse_coord(sto,&dr,&dc)){ continue; } if(make_move(sr,sc,dr,dc,whiteTurn)){ whiteTurn = !whiteTurn; } else { } } return 0; }
/* Berechnung des Hamming-Abstandes zwischen zwei 128-Bit Werten in */ /* einer Textdatei. */ /* Die Werte müssen auf einer separaten Zeile gespeichert sein */ /* */ /* Erstellt: 17.5.2010 */ /* Autor: Thomas Scheffler */ #include <stdio.h> #include <stdlib.h> #define ARRAY_SIZE 32 unsigned Hamdist(unsigned x, unsigned y) { unsigned dist = 0, val = x ^ y; // Count the number of set bits while(val) { ++dist; val &= val - 1; } return dist; } int main (void) { char hex; int i; int a[ARRAY_SIZE]; int b[ARRAY_SIZE]; int hamDist = 0; FILE* fp; //Arrays mit 0 initialisieren for (i = 0; i < ARRAY_SIZE; ++i) { a[i] = 0; b[i] = 0; } fp = fopen("hex.txt","r"); if (fp == NULL) { printf("Die Datei hex.txt wurde nicht gefunden!"); exit(EXIT_FAILURE); } i=0; printf("1.Zeile einlesen.\n"); while((hex=fgetc(fp))!='\n' && hex != EOF) { a[i]=strtol(&hex,0,16); i++; } i=0; printf("2.Zeile einlesen.\n"); while((hex=fgetc(fp))!='\n' && hex != EOF) { b[i]=strtol(&hex,0,16); i++; } fclose(fp); printf("Hamming-Abweichung pro Nibble:\n"); for (i = 0; i < ARRAY_SIZE; ++i) { printf ("%i\t%i\t%i\n",a[i],b[i],Hamdist(a[i],b[i])); hamDist += Hamdist(a[i],b[i]); } printf ("\nHamming-Abweichung der Hash-Werte:%d\n",hamDist); }
Simple Chess (console) - two players local Enter moves like e2e4 or 'quit' to exit. No castling/en-passant/check detection. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid coordinates. Use files a-h and ranks 1-8 (e.g. e2e4). a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Invalid input. Use e2e4 or 'e2 e4'. a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: a b c d e f g h 8 r n b q k b n r 8 7 p p p p p p p p 7 6 . . . . . . . . 6 5 . . . . . . . . 5 4 . . . . . . . . 4 3 . . . . . . . . 3 2 P P P P P P P P 2 1 R N B Q K B N R 1 a b c d e f g h White to move: Goodbye.