aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-08-24 14:04:11 +0000
committerrodri <rgl@antares-labs.eu>2023-08-24 14:04:11 +0000
commitc2782417e222be0e61fd910bae5c3d127bdda90b (patch)
tree628e5ac985cee02566a52e5fe0b49884529caa8a /dat.h
parent6226ca4a218bac64a5bed634edc1220080c26a1a (diff)
downloadbattleship-c2782417e222be0e61fd910bae5c3d127bdda90b.tar.gz
battleship-c2782417e222be0e61fd910bae5c3d127bdda90b.tar.bz2
battleship-c2782417e222be0e61fd910bae5c3d127bdda90b.zip
fixed the match process cleanup procedure.
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/dat.h b/dat.h
index 6d2a6ba..5f503f0 100644
--- a/dat.h
+++ b/dat.h
@@ -10,7 +10,7 @@ enum {
Waiting0 = 0,
Outlaying,
- Waiting1,
+ Waiting,
Playing,
Boardmargin = 50,
@@ -43,7 +43,7 @@ struct Ship
Rectangle bbox;
int orient;
int ncells;
- int *hit; /* |hit| = ncells and hit = {x: 0 ≤ x ≤ 1} */
+ int *hit; /* |hit| = ncells and hit ∈ {0,1} */
int sunk;
};
@@ -58,8 +58,7 @@ struct Player
{
int fd;
int sfd;
- Channel *mc; /* for matching */
- Player *o; /* opponent */
+ int state;
};
struct Playerq