Lines Matching refs:hit
136 int hits; /* how many times has this ship been hit? */
739 /* register a hit on the targeted ship */
819 bool hit;
831 hit = IS_SHIP(board[COMPUTER][curx][cury]);
832 hits[PLAYER][curx][cury] = (hit ? MARK_HIT : MARK_MISS);
836 if (hit)
847 prompt(1, "You %s.", hit ? "scored a hit" : "missed");
848 if (hit && (ss = hitship(curx, cury))) {
869 return (hit);
952 bool hit, sunk;
955 hits[COMPUTER][x][y] = (hit = (board[PLAYER][x][y])) ? MARK_HIT : MARK_MISS;
957 "I shoot at %c%d. I %s!", y + 'A', x, hit ? "hit" :
959 if ((sunk = (hit && (ss = hitship(x, y)))) != 0)
966 if (hit)
972 (void) addch((chtype) (hit ? SHOWHIT : SHOWSPLASH));
977 return hit ? (sunk ? S_SUNK : S_HIT) : S_MISS;
1003 int hit = S_MISS;
1009 if (!(hit = cpufire(x, y)))
1015 next = (hit == S_SUNK) ? RANDOM_FIRE : RANDOM_HIT;
1019 case RANDOM_HIT: /* last shot was random and hit */
1023 case HUNT_DIRECT: /* last shot hit, we're looking for ship's long axis */
1051 if (!(hit = cpufire(x, y)))
1058 next = (hit == S_SUNK) ? RANDOM_FIRE : FIRST_PASS;
1066 if (POSSIBLE(x, y) && (hit = cpufire(x, y))) {
1070 next = (hit == S_SUNK) ? RANDOM_FIRE : FIRST_PASS;
1079 if (POSSIBLE(x, y) && (hit = cpufire(x, y))) {
1084 next = (hit == S_SUNK) ? RANDOM_FIRE : SECOND_PASS;
1092 if (POSSIBLE(x, y) && (hit = cpufire(x, y))) {
1096 next = (hit == S_SUNK) ? RANDOM_FIRE : SECOND_PASS;
1113 return ((hit) ? TRUE : FALSE);