/* chess-player.c generated by valac 0.36.0.2-c0ff, the Vala compiler
 * generated from chess-player.vala, do not modify */

/* -*- Mode: vala; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * Copyright (C) 2010-2014 Robert Ancell
 * Copyright (C) 2015-2016 Sahil Sareen
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
 * license.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>


#define TYPE_COLOR (color_get_type ())

#define TYPE_CHESS_PLAYER (chess_player_get_type ())
#define CHESS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHESS_PLAYER, ChessPlayer))
#define CHESS_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHESS_PLAYER, ChessPlayerClass))
#define IS_CHESS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHESS_PLAYER))
#define IS_CHESS_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHESS_PLAYER))
#define CHESS_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHESS_PLAYER, ChessPlayerClass))

typedef struct _ChessPlayer ChessPlayer;
typedef struct _ChessPlayerClass ChessPlayerClass;
typedef struct _ChessPlayerPrivate ChessPlayerPrivate;

#define TYPE_PIECE_TYPE (piece_type_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	CHESS_PLAYER_DO_MOVE_SIGNAL,
	CHESS_PLAYER_DO_UNDO_SIGNAL,
	CHESS_PLAYER_DO_RESIGN_SIGNAL,
	CHESS_PLAYER_DO_CLAIM_DRAW_SIGNAL,
	CHESS_PLAYER_LAST_SIGNAL
};
static guint chess_player_signals[CHESS_PLAYER_LAST_SIGNAL] = {0};

typedef enum  {
	COLOR_WHITE,
	COLOR_BLACK
} Color;

struct _ChessPlayer {
	GObject parent_instance;
	ChessPlayerPrivate * priv;
	Color color;
};

struct _ChessPlayerClass {
	GObjectClass parent_class;
};

struct _ChessPlayerPrivate {
	gboolean _local_human;
};

typedef enum  {
	PIECE_TYPE_PAWN,
	PIECE_TYPE_ROOK,
	PIECE_TYPE_KNIGHT,
	PIECE_TYPE_BISHOP,
	PIECE_TYPE_QUEEN,
	PIECE_TYPE_KING
} PieceType;


static gpointer chess_player_parent_class = NULL;

GType color_get_type (void) G_GNUC_CONST;
GType chess_player_get_type (void) G_GNUC_CONST;
#define CHESS_PLAYER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CHESS_PLAYER, ChessPlayerPrivate))
enum  {
	CHESS_PLAYER_DUMMY_PROPERTY,
	CHESS_PLAYER_LOCAL_HUMAN
};
ChessPlayer* chess_player_new (Color color);
ChessPlayer* chess_player_construct (GType object_type, Color color);
gboolean chess_player_move (ChessPlayer* self, const gchar* move, gboolean apply);
GType piece_type_get_type (void) G_GNUC_CONST;
gboolean chess_player_move_with_coords (ChessPlayer* self, gint r0, gint f0, gint r1, gint f1, gboolean apply, PieceType promotion_type);
void chess_player_undo (ChessPlayer* self);
gboolean chess_player_resign (ChessPlayer* self);
void chess_player_claim_draw (ChessPlayer* self);
gboolean chess_player_get_local_human (ChessPlayer* self);
void chess_player_set_local_human (ChessPlayer* self, gboolean value);
static void g_cclosure_user_marshal_BOOLEAN__STRING_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void g_cclosure_user_marshal_BOOLEAN__VOID (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void chess_player_finalize (GObject * obj);
static void _vala_chess_player_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_chess_player_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


GType color_get_type (void) {
	static volatile gsize color_type_id__volatile = 0;
	if (g_once_init_enter (&color_type_id__volatile)) {
		static const GEnumValue values[] = {{COLOR_WHITE, "COLOR_WHITE", "white"}, {COLOR_BLACK, "COLOR_BLACK", "black"}, {0, NULL, NULL}};
		GType color_type_id;
		color_type_id = g_enum_register_static ("Color", values);
		g_once_init_leave (&color_type_id__volatile, color_type_id);
	}
	return color_type_id__volatile;
}


ChessPlayer* chess_player_construct (GType object_type, Color color) {
	ChessPlayer * self = NULL;
	Color _tmp0_;
#line 37 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	self = (ChessPlayer*) g_object_new (object_type, NULL);
#line 39 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp0_ = color;
#line 39 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	self->color = _tmp0_;
#line 37 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	return self;
#line 125 "chess-player.c"
}


ChessPlayer* chess_player_new (Color color) {
#line 37 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	return chess_player_construct (TYPE_CHESS_PLAYER, color);
#line 132 "chess-player.c"
}


gboolean chess_player_move (ChessPlayer* self, const gchar* move, gboolean apply) {
	gboolean result = FALSE;
	const gchar* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_ = FALSE;
#line 42 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 42 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_val_if_fail (move != NULL, FALSE);
#line 44 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp0_ = move;
#line 44 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp1_ = apply;
#line 44 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_signal_emit (self, chess_player_signals[CHESS_PLAYER_DO_MOVE_SIGNAL], 0, _tmp0_, _tmp1_, &_tmp2_);
#line 44 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	result = _tmp2_;
#line 44 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	return result;
#line 155 "chess-player.c"
}


gboolean chess_player_move_with_coords (ChessPlayer* self, gint r0, gint f0, gint r1, gint f1, gboolean apply, PieceType promotion_type) {
	gboolean result = FALSE;
	gchar* move;
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gchar* _tmp4_;
	PieceType _tmp5_;
	const gchar* _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_ = FALSE;
#line 47 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 50 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp0_ = f0;
#line 50 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp1_ = r0;
#line 50 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp2_ = f1;
#line 50 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp3_ = r1;
#line 50 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp4_ = g_strdup_printf ("%c%d%c%d", 'a' + _tmp0_, _tmp1_ + 1, 'a' + _tmp2_, _tmp3_ + 1);
#line 50 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	move = _tmp4_;
#line 52 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp5_ = promotion_type;
#line 52 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	switch (_tmp5_) {
#line 52 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		case PIECE_TYPE_QUEEN:
#line 191 "chess-player.c"
		{
#line 56 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			break;
#line 195 "chess-player.c"
		}
#line 52 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		case PIECE_TYPE_KNIGHT:
#line 199 "chess-player.c"
		{
			const gchar* _tmp6_;
			gchar* _tmp7_;
#line 58 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			_tmp6_ = move;
#line 58 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			_tmp7_ = g_strconcat (_tmp6_, "=N", NULL);
#line 58 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			_g_free0 (move);
#line 58 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			move = _tmp7_;
#line 59 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			break;
#line 213 "chess-player.c"
		}
#line 52 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		case PIECE_TYPE_ROOK:
#line 217 "chess-player.c"
		{
			const gchar* _tmp8_;
			gchar* _tmp9_;
#line 61 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			_tmp8_ = move;
#line 61 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			_tmp9_ = g_strconcat (_tmp8_, "=R", NULL);
#line 61 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			_g_free0 (move);
#line 61 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			move = _tmp9_;
#line 62 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			break;
#line 231 "chess-player.c"
		}
#line 52 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		case PIECE_TYPE_BISHOP:
#line 235 "chess-player.c"
		{
			const gchar* _tmp10_;
			gchar* _tmp11_;
#line 64 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			_tmp10_ = move;
#line 64 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			_tmp11_ = g_strconcat (_tmp10_, "=B", NULL);
#line 64 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			_g_free0 (move);
#line 64 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			move = _tmp11_;
#line 65 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			break;
#line 249 "chess-player.c"
		}
		default:
		{
#line 67 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
			break;
#line 255 "chess-player.c"
		}
	}
#line 70 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp12_ = move;
#line 70 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp13_ = apply;
#line 70 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_signal_emit (self, chess_player_signals[CHESS_PLAYER_DO_MOVE_SIGNAL], 0, _tmp12_, _tmp13_, &_tmp14_);
#line 70 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	result = _tmp14_;
#line 70 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_g_free0 (move);
#line 70 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	return result;
#line 270 "chess-player.c"
}


void chess_player_undo (ChessPlayer* self) {
#line 73 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_if_fail (self != NULL);
#line 75 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_signal_emit (self, chess_player_signals[CHESS_PLAYER_DO_UNDO_SIGNAL], 0);
#line 279 "chess-player.c"
}


gboolean chess_player_resign (ChessPlayer* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 78 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 80 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_signal_emit (self, chess_player_signals[CHESS_PLAYER_DO_RESIGN_SIGNAL], 0, &_tmp0_);
#line 80 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	result = _tmp0_;
#line 80 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	return result;
#line 294 "chess-player.c"
}


void chess_player_claim_draw (ChessPlayer* self) {
#line 83 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_if_fail (self != NULL);
#line 85 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_signal_emit (self, chess_player_signals[CHESS_PLAYER_DO_CLAIM_DRAW_SIGNAL], 0);
#line 303 "chess-player.c"
}


gboolean chess_player_get_local_human (ChessPlayer* self) {
	gboolean result;
	gboolean _tmp0_;
#line 30 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 30 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp0_ = self->priv->_local_human;
#line 30 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	result = _tmp0_;
#line 30 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	return result;
#line 318 "chess-player.c"
}


void chess_player_set_local_human (ChessPlayer* self, gboolean value) {
	gboolean _tmp0_;
#line 31 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_if_fail (self != NULL);
#line 33 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	_tmp0_ = value;
#line 33 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	self->priv->_local_human = _tmp0_;
#line 31 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_object_notify ((GObject *) self, "local-human");
#line 332 "chess-player.c"
}


static void g_cclosure_user_marshal_BOOLEAN__STRING_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_BOOLEAN) (gpointer data1, const char* arg_1, gboolean arg_2, gpointer data2);
	register GMarshalFunc_BOOLEAN__STRING_BOOLEAN callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gboolean v_return;
	cc = (GCClosure *) closure;
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_if_fail (return_value != NULL);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_if_fail (n_param_values == 3);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		data1 = closure->data;
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		data2 = param_values->data[0].v_pointer;
#line 354 "chess-player.c"
	} else {
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		data1 = param_values->data[0].v_pointer;
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		data2 = closure->data;
#line 360 "chess-player.c"
	}
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	callback = (GMarshalFunc_BOOLEAN__STRING_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	v_return = callback (data1, g_value_get_string (param_values + 1), g_value_get_boolean (param_values + 2), data2);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_value_set_boolean (return_value, v_return);
#line 368 "chess-player.c"
}


static void g_cclosure_user_marshal_BOOLEAN__VOID (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef gboolean (*GMarshalFunc_BOOLEAN__VOID) (gpointer data1, gpointer data2);
	register GMarshalFunc_BOOLEAN__VOID callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gboolean v_return;
	cc = (GCClosure *) closure;
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_if_fail (return_value != NULL);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_return_if_fail (n_param_values == 1);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		data1 = closure->data;
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		data2 = param_values->data[0].v_pointer;
#line 390 "chess-player.c"
	} else {
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		data1 = param_values->data[0].v_pointer;
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		data2 = closure->data;
#line 396 "chess-player.c"
	}
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	callback = (GMarshalFunc_BOOLEAN__VOID) (marshal_data ? marshal_data : cc->callback);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	v_return = callback (data1, data2);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_value_set_boolean (return_value, v_return);
#line 404 "chess-player.c"
}


static void chess_player_class_init (ChessPlayerClass * klass) {
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	chess_player_parent_class = g_type_class_peek_parent (klass);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_type_class_add_private (klass, sizeof (ChessPlayerPrivate));
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_chess_player_get_property;
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_chess_player_set_property;
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	G_OBJECT_CLASS (klass)->finalize = chess_player_finalize;
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), CHESS_PLAYER_LOCAL_HUMAN, g_param_spec_boolean ("local-human", "local-human", "local-human", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	chess_player_signals[CHESS_PLAYER_DO_MOVE_SIGNAL] = g_signal_new ("do_move", TYPE_CHESS_PLAYER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_BOOLEAN__STRING_BOOLEAN, G_TYPE_BOOLEAN, 2, G_TYPE_STRING, G_TYPE_BOOLEAN);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	chess_player_signals[CHESS_PLAYER_DO_UNDO_SIGNAL] = g_signal_new ("do_undo", TYPE_CHESS_PLAYER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	chess_player_signals[CHESS_PLAYER_DO_RESIGN_SIGNAL] = g_signal_new ("do_resign", TYPE_CHESS_PLAYER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_BOOLEAN__VOID, G_TYPE_BOOLEAN, 0);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	chess_player_signals[CHESS_PLAYER_DO_CLAIM_DRAW_SIGNAL] = g_signal_new ("do_claim_draw", TYPE_CHESS_PLAYER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 429 "chess-player.c"
}


static void chess_player_instance_init (ChessPlayer * self) {
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	self->priv = CHESS_PLAYER_GET_PRIVATE (self);
#line 27 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	self->priv->_local_human = FALSE;
#line 438 "chess-player.c"
}


static void chess_player_finalize (GObject * obj) {
	ChessPlayer * self;
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CHESS_PLAYER, ChessPlayer);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	G_OBJECT_CLASS (chess_player_parent_class)->finalize (obj);
#line 448 "chess-player.c"
}


GType chess_player_get_type (void) {
	static volatile gsize chess_player_type_id__volatile = 0;
	if (g_once_init_enter (&chess_player_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ChessPlayerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) chess_player_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ChessPlayer), 0, (GInstanceInitFunc) chess_player_instance_init, NULL };
		GType chess_player_type_id;
		chess_player_type_id = g_type_register_static (G_TYPE_OBJECT, "ChessPlayer", &g_define_type_info, 0);
		g_once_init_leave (&chess_player_type_id__volatile, chess_player_type_id);
	}
	return chess_player_type_id__volatile;
}


static void _vala_chess_player_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ChessPlayer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_CHESS_PLAYER, ChessPlayer);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	switch (property_id) {
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		case CHESS_PLAYER_LOCAL_HUMAN:
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		g_value_set_boolean (value, chess_player_get_local_human (self));
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		break;
#line 475 "chess-player.c"
		default:
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		break;
#line 481 "chess-player.c"
	}
}


static void _vala_chess_player_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ChessPlayer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_CHESS_PLAYER, ChessPlayer);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
	switch (property_id) {
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		case CHESS_PLAYER_LOCAL_HUMAN:
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		chess_player_set_local_human (self, g_value_get_boolean (value));
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		break;
#line 497 "chess-player.c"
		default:
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 19 "/home/mcatanzaro/Projects/GNOME/gnome-chess/lib/chess-player.vala"
		break;
#line 503 "chess-player.c"
	}
}



