/*============================================================================*

	SUITE:		e-Scrabble
	FILE:		scrabble.h
	
	COPYRIGHT NOTICE:
	
	Copyright (C) 2001 Players Inc, All Rights Reserved

	THIS MATERIAL IS PROVIDED FOR ACADEMIC USE ONLY, you may modify it
	provided this copyright notice is preserved, however you may not
	redistribute it, or use it for commercial purposes without prior
	written permission of the authors.

	Direct questions, comments, or bug reports to:
	aul@ecf.utoronto.ca
	ticku@ecf.utoronto.ca
	varia@ecf.utoronto.ca	

*============================================================================*/


#ifndef scrabble_h
#define scrabble_h


#include <glib.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>


#define APPNAME		"e-SCRABBLE"
#define APP_DEFAULT_WIDTH	400
#define APP_DEFAULT_HEIGHT	400

#define BLANK_MASK		0x80
#define TILE_EMPTY		0


typedef char Tile;
typedef struct _coord Coord;
typedef struct _bmove Bmove;
typedef struct _board_square Board_Square;
typedef struct _location_status Location_Status;
typedef struct _mover Mover;
typedef int PlayerID;
typedef struct _playeridlist PlayerIDList;
typedef struct _scores Scores;


struct _coord {
	int x;
	int y;
};

struct _bmove {
	gboolean is_swap;
	Coord *pos;
	Tile *t;
	short tiles_in_move;
};

struct _board_square {
	int color;
	char *label;
};

struct _location_status {
	Tile t;
	gboolean new_m;
	gboolean fixed;
};

struct _mover {
	GdkWindow *window;
	GdkPixmap *pixmap;
	Tile t;
	int xstart, ystart, rackstart;
	int xtarget, ytarget, racktarget;
	int xoff, yoff;
};

struct _playeridlist {
	PlayerID *players;
	int num_players;
};

struct _scores {
	PlayerID *players;
	int *scores;
	int num_players;
};


void print_msg (char *);
void print_scores (Scores *);
void get_rack_tiles (Tile *, int *);
void get_invitation_response ( PlayerID );

#endif

