From d54bf215bc9268a73e5f583b155d72a044bf37fb Mon Sep 17 00:00:00 2001
From: ChouTatsumi <choutatsumi@gmail.com>
Date: Mon, 29 Apr 2019 23:12:28 +1000
Subject: [PATCH] create README file

---
 README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 server.c  |  5 +++--
 2 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100644 README.md

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..cbe79f3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,46 @@
+# COMP30023 2019 Project 1
+Please check the Notice(important)
+
+# Reference
+Some of code and techniques come from: 
+"http-server.c" from Lab 6
+"server-1.2.c" from Lab 5
+
+All of the reference documents can be find in ./doc folder
+
+## Running
+Run Makefile (`$ make`), and then `image_tagger.exe` will be created at root folder.
+And then run `./image_tagger <ip_addr> <port>` to start the server program
+
+#NOTICE[IMPORTANT]
+1. 
+This program use windows html files to test, and all the html files is inside ./views folder
+If the html files is in the root folder, please change the file_dir const at line 40-46 in `server.c` file and make again !!!!!!!
+
+2.
+Since some of the lib in the program is only available on linux system, the frequently commit is inevitably. In fact, I commit my code for even small change in order to pull my code down into VM. There might be severval commits just for fixing a single bug.  
+
+## Structure
+```
+comp30023-2019-project-1
+├─┬ doc                     store all the reference files
+│ ├── http-server.c
+│ ├── image_tagger.pdf
+│ └── server-1.2.c
+├─┬ views                   store all the html files
+│ ├── 1_intro.html
+│ ├── 2_start.html
+│ ├── 3_first_turn.html
+│ ├── 4_accepted.html
+│ ├── 5_discarded.html
+│ ├── 6_endgame.html
+│ └── 7_gameover.html
+├── .gitignore 
+├── Makefile
+├── README.md               Contains info about the project 
+├── image_tagger.exe        program made in the situation of working PC
+└── server.c                project source code
+```
+
+##Acknowledgement
+This project completed by Xun Zhang (854776)
\ No newline at end of file
diff --git a/server.c b/server.c
index 9eb42e4..5fa1b3d 100644
--- a/server.c
+++ b/server.c
@@ -2,8 +2,9 @@
 ** COMP30023_2019SM1 Project1
 ** Code completed by Xun Zhang (854776)
 **
-** Reference
+** Reference (attach in ./doc)
 ** "http-server.c" from Lab 6
+** "server-1.2.c" from Lab 5
 */
 
 #include <errno.h>
@@ -272,7 +273,7 @@ static bool handle_http_request(int sockfd) {
                 // remove substring in input "&guess=Guess"
                 int keyword_len = strlen(keyword);
                 keyword[keyword_len - 12] = '\0';
-                
+
                 if (p1_is_ready && p2_is_ready) {
                     if (keyword_check(sockfd, keyword)) {
                         // initial players setting
-- 
GitLab