/* * GSetGame - gsetgame.h * Copyright 2007 Kirill Gorelov * * 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 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef GSETGAME_H #define GSETGAME_H /* gettext support */ #include "gettext.h" /* headers */ #include #ifdef GNOME #include #endif #include #include typedef enum { GAME_CLASSIC=1, GAME_PUZZLE } GAME_TYPE; typedef enum { GAME_PLAYING = 1, GAME_PAUSED, GAME_ABANDONED, GAME_COMPLETED, GAME_HIGHSCORES } GAMESTATE; struct gsetgame_stats { gint num_sets; /* Sets found */ time_t time; /* Time elapsed */ gint time_tag; gchar player[NAME_MAX]; /* Player name */ GAMESTATE state, prev_state; GAME_TYPE game_type; }; struct gsetgame_high_scores { int classic_high_score_handle; int puzzle_high_score_handle; }; extern struct gsetgame_stats game_stats; /* Game logic functions */ void gset_new_game(GAME_TYPE type); void gset_game_no_sets_left(); gboolean gset_game_step(); void gset_game_over(); void gset_game_pause_toggle(); gboolean gset_game_is_paused(); void gset_game_penalty(gint seconds); struct gsetgame_stats *gset_game_get_stats(); GAME_TYPE gset_game_type(); GAMESTATE gset_game_state(); int gset_records_handle(GAME_TYPE gametype); int gset_current_records_handle(); #endif