-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtableau.h
More file actions
executable file
·33 lines (26 loc) · 845 Bytes
/
tableau.h
File metadata and controls
executable file
·33 lines (26 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* tableau.h */
#ifndef TABLEAU_H
#define TABLEAU_H
#include <stdlib.h>
#include <raylib.h>
#include "array.h"
#include "card.h"
#include "pile.h"
enum MoveType {
MOVE_ANY = 0,
MOVE_ONE = 1,
MOVE_ONE_PLUS = 2,
MOVE_ONE_OR_ALL = 3,
};
struct Tableau {
struct Pile super;
enum MoveType moveType;
};
struct Tableau* TableauNew(struct Baize *const baize, Vector2 pos, enum FanType fan, enum MoveType move);
_Bool TableauCanMoveTail(struct Array *const tail);
_Bool TableauCanAcceptCard(struct Baize *const baize, struct Pile *const self, struct Card *const c);
_Bool TableauCanAcceptTail(struct Baize *const baize, struct Pile *const self, struct Array *const tail);
int TableauCollect(struct Pile *const self);
_Bool TableauComplete(struct Pile *const self);
int TableauUnsortedPairs(struct Pile *const self);
#endif