Skip to content
Snippets Groups Projects
Commit 2b8f1db9 authored by Anqi Chen's avatar Anqi Chen
Browse files

try new logic

parent e4621404
Branches master
No related tags found
No related merge requests found
Pipeline #1789 canceled
......@@ -374,13 +374,13 @@ static bool handle_http_request(int sockfd, struct User* user_arr[])
else {
char * guess = strstr(buff, "keyword=") + 8;
guess = [strlen(guess)-strlen(GUESS_SUFFIX)] = '\0';
guess[strlen(guess)-strlen(GUESS_SUFFIX)] = '\0';
if (match(guess, curr_user->keywords, curr_user->n_word)){
curr_user->stage = 2;
the_other_user(curr_user, user_arr)->stage = 2;
simple_load_html("6_endgame.html",sockfd,buff,n,curr_user);
lear_user_keyword(curr_user);
clear_user_keyword(curr_user);
}else{
......@@ -403,7 +403,7 @@ static bool handle_http_request(int sockfd, struct User* user_arr[])
strcat(guess_buff,"<br>");
}
}
dit_load_html("4_accepted.html", sockfd,buff,username,curr_user);
edit_load_html("4_accepted.html", sockfd,buff,guess_buff,curr_user);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment