1
/* ipuz-cryptic.c
2
 *
3
 * Copyright 2022 Jonathan Blandford <jrb@gnome.org>
4
 *
5
 * This library is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU Lesser General Public
7
 * License as published by the Free Software Foundation; either
8
 * version 2.1 of the License, or (at your option) any later version.
9
 *
10
 * This library is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 * Lesser General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU Lesser General Public
16
 * License along with this library; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18
 *
19
 * SPDX-License-Identifier: (LGPL-2.1-or-later OR MIT)
20
 */
21

            
22

            
23
#include "libipuz-config.h"
24
#include <libipuz/ipuz-cryptic.h>
25

            
26

            
27
static void                ipuz_cryptic_init         (IPuzCryptic      *self);
28
static void                ipuz_cryptic_class_init   (IPuzCrypticClass *klass);
29
static const gchar *const *ipuz_cryptic_get_kind_str (IPuzPuzzle       *puzzle);
30

            
31

            
32
3
G_DEFINE_TYPE (IPuzCryptic, ipuz_cryptic, IPUZ_TYPE_CROSSWORD);
33

            
34

            
35
static void
36
7
ipuz_cryptic_init (IPuzCryptic *self)
37
{
38
  /* Pass */
39
7
}
40

            
41
static void
42
3
ipuz_cryptic_class_init (IPuzCrypticClass *klass)
43
{
44
3
  IPuzPuzzleClass *puzzle_class = IPUZ_PUZZLE_CLASS (klass);
45

            
46
3
  puzzle_class->get_kind_str = ipuz_cryptic_get_kind_str;
47
3
}
48

            
49
static const gchar *const *
50
ipuz_cryptic_get_kind_str (IPuzPuzzle *puzzle)
51
{
52
  static const char *kind_str[] =
53
    {
54
      "http://ipuz.org/crossword#1",
55
      "http://ipuz.org/crossword/crypticcrossword#1",
56
      NULL
57
    };
58

            
59
  return kind_str;
60
}
61

            
62
/**
63
 * Public Methods
64
 */
65

            
66
IPuzPuzzle *
67
ipuz_cryptic_new (void)
68
{
69
  IPuzPuzzle *cryptic;
70

            
71
  cryptic = g_object_new (IPUZ_TYPE_CRYPTIC,
72
                          NULL);
73

            
74
  return cryptic;
75
}