You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
projet-tut/Pontu/include/model/Coord.h

28 lines
470 B

/**
* \file Coord.h
* \brief Board coordinates
* \author Théotime Maillarbaux
* \date 06/12/2021
*/
#ifndef COORD_INCLUDED
#define COORD_INCLUDED
#include <stdbool.h>
typedef struct {
int x; ///< Coordinate on the X-axis
int y; ///< Coordinate on the Y-axis
} Coord;
bool coordValide(const Coord coord) {
return coord.x>=0 && coord.y>=0;
}
bool coordEqual(const Coord a, const Coord b) {
return a.x == b.x && a.y == b.y;
}
#endif //COORD_INCLUDED