~ubuntu-branches/debian/sid/gnome-chess/sid

« back to all changes in this revision

Viewing changes to src/chess-pgn.vala

  • Committer: Package Import Robot
  • Author(s): Luca Falavigna, Jeremy Bicha, Jackson Doak, Luca Falavigna
  • Date: 2014-07-15 21:50:20 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140715215020-rhk7hmpjf5xlntb9
Tags: 1:3.12.3-1
* Team upload.

[ Jeremy Bicha ]
* debian/control.in:
  - Depend on hoichess and demote other chess engines to Suggests
    per upstream recommendation (LP: #138570)
  - Bump minimum intoltool and vala
  - Drop sqlite dependency
* debian/gnome-chess.install:
  - AI configuration file moved to /etc/chess-engines.conf

[ Jackson Doak ]
* New upstream release (3.12.3)

[ Luca Falavigna ]
* debian/control.in:
  - Bump Standards-Version to 3.9.5.
  - Refresh build-dependencies required minimum versions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: vala; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 
2
 *
 
3
 * Copyright (C) 2010-2013 Robert Ancell
 
4
 *
 
5
 * This program is free software: you can redistribute it and/or modify it under
 
6
 * the terms of the GNU General Public License as published by the Free Software
 
7
 * Foundation, either version 2 of the License, or (at your option) any later
 
8
 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
 
9
 * license.
 
10
 */
 
11
 
1
12
private int str_index (string name)
2
13
{
3
14
    if (name == "Event")
129
140
        get { return tags.lookup ("Termination"); }
130
141
        set { tags.insert ("Termination", value); }
131
142
    }
 
143
    public string? white_ai
 
144
    {
 
145
        get { return tags.lookup ("WhiteAI"); }
 
146
        set { tags.insert ("WhiteAI", value); }
 
147
    }
 
148
    public string? white_level
 
149
    {
 
150
        get { return tags.lookup ("WhiteLevel"); }
 
151
        set { tags.insert ("WhiteLevel", value); }
 
152
    }
 
153
    public string? black_ai
 
154
    {
 
155
        get { return tags.lookup ("BlackAI"); }
 
156
        set { tags.insert ("BlackAI", value); }
 
157
    }
 
158
    public string? black_level
 
159
    {
 
160
        get { return tags.lookup ("BlackLevel"); }
 
161
        set { tags.insert ("BlackLevel", value); }
 
162
    }
132
163
 
133
164
    public PGNGame ()
134
165
    {
195
226
{
196
227
    public List<PGNGame> games;
197
228
 
198
 
    public PGN ()
199
 
    {
200
 
    }
201
 
 
202
229
    public PGN.from_string (string data) throws PGNError
203
230
    {
204
231
        // FIXME: Feed through newline at end to make sure parsing complete