remove hangman, add mshell
This commit is contained in:
parent
240d7f65c3
commit
fbd948f66f
4 changed files with 2 additions and 49 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -18,7 +18,7 @@ newlib/examples/hello
|
|||
newlib/examples/jacobi
|
||||
newlib/examples/echo
|
||||
newlib/examples/tests
|
||||
newlib/examples/hangman
|
||||
newlib/examples/mshell
|
||||
newlib/tmp/*
|
||||
newlib/x86/*
|
||||
metalsvm.elf
|
||||
|
|
|
@ -11,7 +11,7 @@ LDFLAGS =
|
|||
|
||||
default: all
|
||||
|
||||
all: hello tests jacobi hangman mshell
|
||||
all: hello tests jacobi mshell
|
||||
|
||||
jacobi: jacobi.o
|
||||
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $< -lm
|
||||
|
@ -31,12 +31,6 @@ hello: hello.o
|
|||
$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
|
||||
chmod a-x $@.sym
|
||||
|
||||
hangman: hangman.o
|
||||
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $<
|
||||
$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym
|
||||
$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@
|
||||
chmod a-x $@.sym
|
||||
|
||||
mshell: mshell.o
|
||||
$(CC_FOR_TARGET) -T link.ld -o $@ $(LDFLAGS) $<
|
||||
$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int Spiel ()
|
||||
{
|
||||
//Variablen
|
||||
|
||||
char* Wort = malloc(100*sizeof(char));
|
||||
char* Raten = malloc(100*sizeof(char));;
|
||||
int Versuche = 10;
|
||||
|
||||
printf("Spieler 1 geben sie das Wort ein :");
|
||||
scanf("%s", Wort);
|
||||
|
||||
printf("\n\nNun, Spieler 2 errate bitte das Wort\n");
|
||||
|
||||
while(Raten!=Wort && Versuche > 0){
|
||||
printf("Deine Antwort:");
|
||||
scanf("%s", Raten);
|
||||
|
||||
|
||||
if(!strcmp(Raten,Wort))
|
||||
{
|
||||
printf("ToLL! Das Wort ist richtig");
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Schade das Wort ist falsch");
|
||||
}
|
||||
Versuche--;
|
||||
}
|
||||
return 0;
|
||||
}//Spielen
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
Spiel();
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Add table
Reference in a new issue