Commit 57d38bd40617912516d56ce934c8a5f4818d60b9

Authored by Pedro L Coutin
1 parent 6e6e835058
Exists in master

ocd

Showing 1 changed file with 8 additions and 9 deletions Side-by-side Diff

client/main.c View file @ 57d38bd
... ... @@ -16,18 +16,18 @@
16 16  
17 17  
18 18 void
19   -removep(PLAYER* temp)
  19 +removep(PLAYER *temp)
20 20 {
21   - if(temp->prev == NULL)
  21 + if (temp->prev == NULL)
22 22 {
23   - if(temp->next != NULL)
  23 + if (temp->next != NULL)
24 24 {
25 25 temp->next->prev = NULL;
26 26 }
27 27 }
28 28 else
29 29 {
30   - if(temp->next == NULL)
  30 + if (temp->next == NULL)
31 31 {
32 32 temp->prev->next = NULL;
33 33 }
34 34  
... ... @@ -44,9 +44,9 @@
44 44 choose_hunter(PLAYER *node, unsigned char hpno, PICTURE *hsprite)
45 45 {
46 46 PLAYER *temp;
47   - for(temp = node; temp != NULL; temp = temp->next)
  47 + for (temp = node; temp != NULL; temp = temp->next)
48 48 {
49   - if(temp->playerno == hpno)
  49 + if (temp->playerno == hpno)
50 50 {
51 51 temp->type = 1;
52 52 temp->sprite = hsprite;
... ... @@ -60,7 +60,7 @@
60 60 add_player(PLAYER *node, PLAYER *newp)
61 61 {
62 62 PLAYER *temp;
63   - for(temp = node; temp->next != NULL; temp = temp->next);
  63 + for (temp = node; temp->next != NULL; temp = temp->next);
64 64 temp->next = newp;
65 65 newp->prev = temp;
66 66 newp->next = NULL;
... ... @@ -77,7 +77,7 @@
77 77 add_player(node,&cur_player);
78 78 printf("Player %s (%d) connected, at (%d, %d)\n", cur_player.name,
79 79 cur_player.playerno, cur_player.x, cur_player.y);
80   - }while ((magic = getshort(srv_sock)) == ADD_PLAYER);
  80 + } while ((magic = getshort(srv_sock)) == ADD_PLAYER);
81 81  
82 82 printf("players added\n");
83 83  
... ... @@ -96,7 +96,6 @@
96 96 fprintf(stderr, "Bad magic number %X from server\n", magic);
97 97 exit(EXIT_FAILURE);
98 98 }
99   -
100 99  
101 100 }
102 101