~ubuntu-branches/ubuntu/warty/gnushogi/warty

« back to all changes in this revision

Viewing changes to doc/make_fig2

  • Committer: Bazaar Package Importer
  • Author(s): Javier Fernandez-Sanguino Pen~a
  • Date: 2004-01-09 16:06:59 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040109160659-n26nu7009llm247p
Tags: 1.3-3.1
* NMU
 - Minimal testing done and looks quite OK (even if I don't know
   how to play the game...)
 - Build-Depends move from libxaw-dev to libxaw6-dev (Closes: #169975)
 - Included errno.h in gnushogi which makes the binary build properly
   now (and is usable with xshogi) (Closes: #226319)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/env python
 
2
 
 
3
import sys, re
 
4
 
 
5
key = "three-mover.  Here is a really trivial three-mover:"
 
6
 
 
7
replace = """
 
8
three-mover.  Here is a really trivial three-mover:
 
9
<P>
 
10
<PRE>
 
11
 
 
12
   3    2    1            
 
13
----------------+         
 
14
 |    |    |    |  a         
 
15
----------------+           
 
16
 |    |    | wK |  b         
 
17
----------------+           
 
18
 |    |    |    |  c       
 
19
----------------+         
 
20
 | bN |    |    |  d       
 
21
----------------+         
 
22
 |    |    |    |  e       
 
23
----------------+         
 
24
 |    | bN |    |  f       
 
25
----------------+
 
26
 
 
27
Black in hand: S, G
 
28
 
 
29
</PRE>
 
30
"""
 
31
 
 
32
#
 
33
# Insert the figure directly into the html file.
 
34
#
 
35
 
 
36
done = 0
 
37
 
 
38
while 1:
 
39
    line = sys.stdin.readline()
 
40
    if not line:
 
41
        break
 
42
    
 
43
    if not done:
 
44
        match = re.match(key, line)
 
45
        if match:
 
46
            print replace,
 
47
            done = 1
 
48
        else:
 
49
            print line,
 
50
    else:
 
51
        print line,
 
52
 
 
53