mirror of
https://github.com/Soccera1/agg.git
synced 2026-02-04 04:03:40 +01:00
Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
826cda95f0 | ||
|
|
e756cede3a | ||
|
|
34169274f4 | ||
|
|
a01f7a6699 | ||
|
|
ce21da8661 |
4 changed files with 13 additions and 6 deletions
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
run: sudo apt-get update && sudo apt-get install -y build-essential
|
||||
|
||||
- name: Build project for Linux
|
||||
run: make all
|
||||
run: LDFLAGS="-static" make all
|
||||
working-directory: ${{ github.workspace }}
|
||||
|
||||
- name: Upload Linux artifact
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
src/agg
|
||||
bin
|
||||
obj
|
||||
AGENTS.md
|
||||
|
|
|
|||
6
Makefile
6
Makefile
|
|
@ -1,6 +1,8 @@
|
|||
# Compiler and flags
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -Wextra -std=c99 -O3 -flto
|
||||
EXTRA_CFLAGS ?=
|
||||
CFLAGS ?= -Wall -Wextra -std=c99 -pedantic -O3 -flto $(EXTRA_CFLAGS)
|
||||
LDFLAGS ?=
|
||||
DEBUG_FLAGS = -g -DDEBUG
|
||||
|
||||
# Directories
|
||||
|
|
@ -29,7 +31,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c | $(OBJDIR)
|
|||
|
||||
# Link executable
|
||||
$(TARGET): $(OBJECTS) | $(BINDIR)
|
||||
$(CC) $(OBJECTS) -o $@
|
||||
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
|
||||
|
||||
# Debug build
|
||||
debug: CFLAGS += $(DEBUG_FLAGS)
|
||||
|
|
|
|||
10
src/agg.c
10
src/agg.c
|
|
@ -85,6 +85,10 @@ int main(void) {
|
|||
int playtime;
|
||||
printf ("\nHow long would you like to play for? Answer in seconds.\n");
|
||||
scanf ("%d", &playtime);
|
||||
if (playtime < 1) {
|
||||
printf ("Error! You must select at least one second.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int number_length;
|
||||
printf ("Please enter maximum possible number\n");
|
||||
|
|
@ -152,12 +156,12 @@ int main(void) {
|
|||
if (score >= 1) {
|
||||
printf ("Great job, %s!\n", username);
|
||||
} else {
|
||||
printf ("try again!, %s.\n", username);
|
||||
printf ("Try again!, %s.\n", username);
|
||||
}
|
||||
if (accuracytype == 1) {
|
||||
printf ("you got an accuracy of %d%%!\n", (int)accuracy);
|
||||
printf ("You got an accuracy of %d%%!\n", (int)accuracy);
|
||||
} else {
|
||||
printf ("you got an accuracy of %g%%!\n", accuracy);
|
||||
printf ("You got an accuracy of %g%%!\n", accuracy);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue