From e987d58b4cb7186a5a2d9ce853107dd1ba164009 Mon Sep 17 00:00:00 2001 From: Mesfin Date: Fri, 19 Jun 2015 17:32:53 -0400 Subject: [PATCH] Final changes made to HangPerson HW --- HangPerson/.DS_Store | Bin 0 -> 6148 bytes HangPerson/HangPerson/main.m | 60 +++++++++++++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 HangPerson/.DS_Store diff --git a/HangPerson/.DS_Store b/HangPerson/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..0e8dde57399c3ab5cf239ef4ebd72f1a02b68ba7 GIT binary patch literal 6148 zcmeHKu}Z{15PhRp9N1i8VY!v1aDNbv2$sVAfRf0`X-rTLEb}S0{(^tuANgiylnbU% z3lW`xowwPY*`0Zi-5mh3*wk}i24KpjDB2kj9Uh(9apMV5@*1bOz%B03;$~!_-#DbP z@8bmLjCh6Z_>b^_ikZ~Rsbf|x*4L}~vTB>o5?Nn;#kXn8vfkWRz{}I&b6(-o`!;R; zZQt&4JLX3VJ#;V-39aOmlAnG$Z z3;SA2s84b%9D75~P{dq`<|yL0`N%^`(h=wKii z7&5SHpEJGxkNL}t7WqS$_zDJsfj`E8Ov+`sU{Zd!en?O6+QfForlNMeb|~x*9s&H& hbL1dT+I-SJ?Fz@6M>`sh_Kqe$qFz^EmyaEAJKV<*_ literal 0 HcmV?d00001 diff --git a/HangPerson/HangPerson/main.m b/HangPerson/HangPerson/main.m index 948dd70..d0d0933 100644 --- a/HangPerson/HangPerson/main.m +++ b/HangPerson/HangPerson/main.m @@ -11,8 +11,64 @@ int main(int argc, const char * argv[]) { @autoreleasepool { - // code goes here... - + char *a[] = {"apple","concatenate","boolean","pencil","bird", + "bachata","lobster","tango","serendipity","paper"}; + + char *currentWord = a[arc4random_uniform(10)]; + + char dashes[strlen(currentWord)]; + + for(int i=0;i=cap){ + printf("You exceeded guess limit, sorry you lost!\n"); + printf("Word was: %s",currentWord); + break; + } + BOOL foundDash = NO; + for(int i=0;i