~smlavine/ascii-breakout

68be0c2cdaafe5acf2d52bd78e63dbd14f8524b7 — Sebastian LaVine 7 months ago 6ea60a4
Remove unnecessary comments
1 files changed, 6 insertions(+), 7 deletions(-)

M main.c
M main.c => main.c +6 -7
@@ 78,7 78,7 @@ typedef enum {
	RED_BLOCK = RED,
	BLUE_BLOCK = BLUE,
	GREEN_BLOCK = GREEN,
	EMPTY = 0, /* A tile not occupied by the ball, paddle, or a block. */
	EMPTY = 0,
} Tile;




@@ 193,10 193,9 @@ checkBall(Ball *ball, int *blocksLeft, unsigned int *score, unsigned int frame)
		 * roll about on the paddle for a little bit, which is actually
		 * kindof fun. Try it out if you're bored. */
		(*ball).yDirection = -(*ball).yDirection;
		/* randomize bounce a bit */
		/* randomize bounce and velocity */
		if (rand() % 2 == 0)
			(*ball).xDirection = -(*ball).xDirection;
		/* randomize velocity */
		(*ball).xVelocity = (rand() % 8) + 5;
		(*ball).yVelocity = (rand() % 8) + 5;
	/* bounce off (and destroy) block */


@@ 614,14 613,14 @@ play(int level, unsigned int *score, int *lives)
				return 1;
			}

		} /* for (;;) (input loop) */
		}

		/* if the player has ran out of lives, then the game is over.
		 */
		if (*lives <= 0) {
			return 0;
		}
	} /* life loop */
	}

	return 1; /* indicates that the player has not ran out of lives */
}


@@ 692,12 691,12 @@ showMessage(char *fmt, ...)
				line[strlen(line)] = *token;
				break;
			}
		} /* while (*token) */
		}

		locate(WIDTH / 2 - strlen(line) / 2, HEIGHT / 2 + lineNumber);
		printf("%s", line);

	} /* for(...) */
	}

	va_end(ap);
	fflush(stdout);