File:Lasker vs Bauer, 1889.gif

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file(800 × 800 pixels, file size: 3.39 MB, MIME type: image/gif, looped, 78 frames, 1 min 57 s)

Summary

Description
English: Animation of the Lasker versus Bauer chess game
Date
Source Own work
Author Morn
GIF development
InfoField
Python-logo-notext 
This GIF graphic was created with Python.
Source code
InfoField

Python code

Source code
#!/usr/bin/env python3

# Plot a PGN game using python-chess and ImageMagick

import os
import chess.pgn
import chess.svg

pgn = open('lasker_bauer_1889.pgn')
game = chess.pgn.read_game(pgn)
board = game.board()

def svg(i):
    lm = board.peek()
    a = [(lm.from_square, lm.to_square)]
    s = chess.svg.board(board, arrows = a, size = 800)

    f1 = "g_%04u.svg" % i
    f2 = "g_%04u.png" % i

    with open(f1, 'w') as f:
        f.write(s)
    os.system("convert %s %s" % (f1, f2))
    os.system("rm %s" % f1)

i = 1

for m in game.mainline_moves():
    board.push(m)
    svg(i)
    i += 1

# pause animation at the end:
for j in range(3):
    svg(i)
    i += 1

# create animation with
# convert -delay 150 g_*.png -loop 0 g.gif

PGN

[Event "Amsterdam"]
[Site "Amsterdam NED"]
[Date "1889.08.26"]
[EventDate "1889.08.26"]
[Round "1"]
[Result "1-0"]
[White "Emanuel Lasker"]
[Black "Johann Hermann Bauer"]
[ECO "A03"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "75"]

1.f4 d5 2.e3 Nf6 3.b3 e6 4.Bb2 Be7 5.Bd3 b6 6.Nc3 Bb7 7.Nf3
Nbd7 8.O-O O-O 9.Ne2 c5 10.Ng3 Qc7 11.Ne5 Nxe5 12.Bxe5 Qc6
13.Qe2 a6 14.Nh5 Nxh5 15.Bxh7+ Kxh7 16.Qxh5+ Kg8 17.Bxg7 Kxg7
18.Qg4+ Kh7 19.Rf3 e5 20.Rh3+ Qh6 21.Rxh6+ Kxh6 22.Qd7 Bf6
23.Qxb7 Kg7 24.Rf1 Rab8 25.Qd7 Rfd8 26.Qg4+ Kf8 27.fxe5 Bg7
28.e6 Rb7 29.Qg6 f6 30.Rxf6+ Bxf6 31.Qxf6+ Ke8 32.Qh8+ Ke7
33.Qg7+ Kxe6 34. Qxb7 Rd6 35. Qxa6 d4 36. exd4 cxd4 37. h4 d3
38. Qxd3 1-0

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

20 December 2020

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current15:27, 20 December 2020Thumbnail for version as of 15:27, 20 December 2020800 × 800 (3.39 MB)MornUploaded own work with UploadWizard
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file: