Logo Search packages:      
Sourcecode: mathwar version File versions  Download package

game_engine.h File Reference


Detailed Description

The main engine of the MathWar game.

This engine is basically a state machine controlled by a couple of timeouts.

Author:
Kenneth W. Sodemann <stufflehead@bigfoot.com>
Revision
1.3
Date
2002/04/04 22:22:50

Definition in file game_engine.h.

#include <gnome.h>
#include "operators.h"
#include "player.h"

Go to the source code of this file.

Classes

struct  game_engine

Defines

#define NUM_MARBLES   100

Enumerations

enum  game_state {
  NOT_RUNNING = 0, BETWEEN_ROUNDS, IN_ROUND, COMP_GUESSING,
  AFTER_COMP_GUESS, GAME_OVER
}

Functions

void begin_game (game_engine *game)
 Perform initialization required before each game.
void begin_round (game_engine *game)
 Start a round.
game_engine * create_game_engine (GtkWidget *parent)
 Create and intialize a game engine instance.
void destroy_game_engine (game_engine *game)
 Destroy the game engine.
const player_objectget_player1 (const game_engine *game)
const player_objectget_player2 (const game_engine *game)
void handle_no_answer (game_engine *game)
void handle_player_answer (game_engine *game, const gchar *answer)
 Handle the even of a player providing an answer.
void handle_yes_answer (game_engine *game)
void pause_game (game_engine *game)
void restore_game (game_engine *game)


Generated by  Doxygen 1.6.0   Back to index