~ubuntu-branches/ubuntu/saucy/cuyo/saucy

« back to all changes in this revision

Viewing changes to data/reversi_brl.m4

  • Committer: Bazaar Package Importer
  • Author(s): Angel Abad
  • Date: 2010-07-19 09:54:44 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100719095444-ecoegzo1vvvdwra9
Tags: 2.~-1.1.brl3-1ubuntu1
* Merge from debian unstable (LP: #607106). Remaining changes:
  - Don't register MimeType=application/x-executable in
    the .desktop file.
  - Remove UTF-8 in the .desktop file
  - 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -- m4 % > %*.ld; echo ready --
 
2
#   Copyright(C) 2005 Bernhard R. Link
 
3
 
4
#   This program is free software; you can redistribute it and/or modify
 
5
#   it under the terms of the GNU General Public License as published by
 
6
#   the Free Software Foundation; either version 2 of the License, or
 
7
#   (at your option) any later version.
 
8
 
9
#   This program is distributed in the hope that it will be useful,
 
10
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
#   GNU General Public License for more details.
 
13
#
 
14
#   You should have received a copy of the GNU General Public License
 
15
#   along with this program; if not, write to the Free Software
 
16
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
changequote([, ])
 
18
define([showingeneratedfile],[$1])
 
19
showingeneratedfile([#This is a generated file. Make changes in the .m4 file with the same basename.])
 
20
ReversiBRL={
 
21
        name = "Reversi"
 
22
        author = "brl"
 
23
        pics = _0,_1
 
24
        greypic = grey
 
25
        startpic = lreAlle.xpm
 
26
        startdist = "-........-","-........-", "F........F", "F........F","F...-....F"
 
27
        startdist[1] = "F........F","F........F", "F........F", "F........F","F........F"
 
28
        numexplode = 15
 
29
        chaingrass = 1
 
30
        toptime = 400
 
31
        << var ro; >>
 
32
 
 
33
        grey = {
 
34
                pics = lreAlle.xpm
 
35
                << grey ={C*}; >>
 
36
        }
 
37
dnl
 
38
define([paint],[dnl
 
39
                        if ro != 0 => { 
 
40
                                ro = 0;
 
41
                                pos=eval( 3 + othernr ),
 
42
                                  pos=eval( 6 + othernr ),
 
43
                                  pos=eval( 9 + othernr ),
 
44
                                  pos=eval( 12+ othernr ),
 
45
                                  pos=eval( 15+ othernr );
 
46
                        } else => {
 
47
                                pos = thisnr;
 
48
                        };
 
49
                        *
 
50
])dnl
 
51
dnl
 
52
define([activate],[kind@($1,$2)=thisname;ro@($1,$2)=1])dnl
 
53
define([looklook],[dnl
 
54
if kind@($1,$2)==thisname->{$5}dnl
 
55
ifelse($6,0,,[else->dnl
 
56
if kind@($1,$2)==othername->{dnl
 
57
looklook(eval($1 + $3),eval($2 +$4),$3,$4,activate($1,$2)[;]$5,decr($6))}dnl
 
58
])dnl
 
59
])dnl
 
60
dnl
 
61
define([look],[if kind@($1,$2)==othername->{dnl
 
62
looklook(eval($1+$1),eval($2+$2),$1,$2,activate($1,$2),$3)dnl
 
63
};dnl
 
64
])dnl
 
65
dnl
 
66
dnl defcolor(self,other,mypos)
 
67
define([defcolor],[dnl
 
68
        define([thisname],_$1)dnl
 
69
        define([othername],[_]eval( 1- $1))dnl
 
70
        define([thisnr],$1)dnl
 
71
        define([othernr],eval( 1 - $1))
 
72
        thisname = {
 
73
                pics = lreAlle.xpm
 
74
                << 
 
75
                thisname = {
 
76
                        paint;
 
77
                };
 
78
                thisname.land = {
 
79
                        look(1,1,7)
 
80
                        look(1,0,7)
 
81
                        look(1,-1,7)
 
82
                        look(0,1,16)
 
83
dnl                     look(0,-1,7)
 
84
                        look(-1,1,7)
 
85
                        look(-1,0,7)
 
86
                        look(-1,-1,7)
 
87
                };
 
88
                >>
 
89
        }
 
90
])
 
91
        defcolor(0)
 
92
        defcolor(1)
 
93
}