/*
    This file is part of Society Chess.
    Society Chess is a network chess game.
    Copyright (C) 2011  Sterling Pickens

    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.

    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, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MOVEMENT_H
#define _MOVEMENT_H 1

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <unistd.h>
#include <string.h>
#include "extern_globals.h"

//0 white 1 black
extern int my_team_color;
//0 no 1 yes
extern int my_turn;
//extern typedef struct movement;
extern struct pieces my_pieces[16];
extern struct pieces oponent_pieces[16];
extern int checkmate;
extern int op_checkmate;
extern int op_check;
extern int check;
void Setup_Pieces(void);
//void Valid_Destination(void);
//void Valid_Source(void);
int Valid_Source(struct movement *move);
int Valid_Destination(struct pieces *p1, struct pieces *p2, struct movement *move);
void Make_Move(struct pieces *p1, struct pieces *p2, struct movement *move);
//int Simulate_Is_Check(struct pieces *p1, struct pieces *p2, struct movement *move);
//int Pawn_Move_Fail(struct movement *vars);
//int One_Axis_Move_Fail(struct movement *vars);
//int Diagonal_Move_Fail(struct movement *vars);
//int Check(struct movement *vars);
//int CheckMate(struct movement *vars);


#endif
