Commit graph

61 commits

Author SHA1 Message Date
Yorick Barbanneau
46a55f31d1 First working version with ncurse an inception = 2 2021-10-21 02:10:16 +02:00
Yorick Barbanneau
dafe6f73ee Ncurse interface seems to work... 2021-10-18 21:39:00 +02:00
Yorick Barbanneau
8656f37eab First commit with view 2021-10-15 17:26:48 +02:00
Yorick Barbanneau
64c85567d9 Add draw function in model.c 2021-10-15 17:01:32 +02:00
Yorick Barbanneau
f2bc1a2c12 Bad shot name of TOPLEFT 2021-10-15 16:59:22 +02:00
Yorick Barbanneau
97ecb4d93a value get all p_move value separately un play_move() 2021-10-15 16:54:00 +02:00
Yorick Barbanneau
4f8ced6d0e Comment some elements 2021-10-15 16:51:44 +02:00
Yorick Barbanneau
e1f15eacc6 Comment some elements 2021-10-15 16:50:33 +02:00
Yorick Barbanneau
517bcfdc42 Comment some element 2021-10-15 16:49:10 +02:00
Yorick Barbanneau
1fb60df60e Replace ternary operator with if..else.. 2021-10-15 16:47:06 +02:00
Yorick Barbanneau
8db53c2eaf Corrections in play_move() 2021-10-15 16:39:52 +02:00
Yorick Barbanneau
e9dca0371f Add savefile function 2021-10-15 15:44:46 +02:00
Yorick Barbanneau
3a020073f9 Set inner_ttt winner correctly in play_move() 2021-10-15 14:52:25 +02:00
Yorick Barbanneau
f4fb6f5137 Some corrections in play_move 2021-10-15 14:46:38 +02:00
Yorick Barbanneau
dc5b803e03 Bad test in set_ttt_winner() 2021-10-08 17:09:00 +02:00
Yorick Barbanneau
bc3b831d42 Set correct player for outer_ttt in play(move) 2021-10-08 17:05:17 +02:00
Yorick Barbanneau
777480000d Bad winner when check second diagonale 2021-10-08 17:02:46 +02:00
Yorick Barbanneau
dd55f8fa05 Little moficitations in play_move() 2021-10-08 17:00:14 +02:00
Yorick Barbanneau
ed98fa9d32 Rewrite set_tictactoe_winner() 2021-10-08 16:52:28 +02:00
Yorick Barbanneau
c1a0446402 Add a test for i in set_tictactoe_winner() 2021-10-08 16:39:57 +02:00
Yorick Barbanneau
943e63ee45 Wrong test for winner in play_move() 2021-10-08 15:34:15 +02:00
Yorick Barbanneau
d4ce681a9d Define outer_ttt winner (if one) un play_move() 2021-10-08 15:32:11 +02:00
Yorick Barbanneau
10d2bca697 Update p_uttt in play_move) 2021-10-08 15:25:52 +02:00
Yorick Barbanneau
514e9f397f Fist version of play_move() 2021-10-08 15:17:11 +02:00
Yorick Barbanneau
0e8fb22424 Re-add winner test for outer_ttt in is_move_valid() 2021-10-07 23:23:18 +02:00
Yorick Barbanneau
e6449a2013 Determine if inner_ttt case is free
in is_move_valid()
2021-10-07 22:46:46 +02:00
Yorick Barbanneau
7e7502dcec Rewrite is_move_valid() 2021-10-07 22:30:36 +02:00
Yorick Barbanneau
0ff026b4ca Avoid segfault when testing p_uttt->history
in get_next_outter_position()
2021-10-07 22:02:12 +02:00
Yorick Barbanneau
f319f0e53c Add missing test 2021-10-01 17:20:15 +02:00
Yorick Barbanneau
8074c40810 Test for get_next_player_to_play() 2021-10-01 17:16:30 +02:00
Yorick Barbanneau
dd3ed1fce2 Remove test on last player 2021-10-01 17:00:19 +02:00
Yorick Barbanneau
26fd5b1d5b Update get_next_player_to_play() 2021-10-01 16:57:39 +02:00
Yorick Barbanneau
4f88097937 Add missing }, because i'm too fool 2021-10-01 16:52:49 +02:00
Yorick Barbanneau
09754638de Add BOTH in set_tictactoe_winner 2021-10-01 16:50:18 +02:00
Yorick Barbanneau
c342b2c416 Update get_next_player() 2021-10-01 16:40:30 +02:00
Yorick Barbanneau
48c6360b0d update is_move_valid 2021-10-01 16:19:21 +02:00
Yorick Barbanneau
aa72f3bc30 revert change 2021-10-01 15:47:07 +02:00
Yorick Barbanneau
ca1a5997aa Add bin for exectutable output 2021-10-01 15:43:18 +02:00
Yorick Barbanneau
e6639a159c First working cmake version 2021-10-01 01:23:36 +02:00
Yorick Barbanneau
94c88d09e9 Make Valgind Happy (on my compuper) 2021-10-01 00:50:29 +02:00
Yorick Barbanneau
82cc816f76 Error in pointer 2021-10-01 00:25:35 +02:00
Yorick Barbanneau
b44e75e56e Add CMakeLists files 2021-10-01 00:07:29 +02:00
Yorick Barbanneau
f33b6c8acb Add model 2021-10-01 00:03:33 +02:00
Yorick Barbanneau
90508a3b3b Rework contest argument parsing. 2021-09-17 16:43:35 +02:00
Yorick Barbanneau
b16d91fb2e return an exti(), seriously? 2021-09-17 16:37:25 +02:00
Yorick Barbanneau
82cf981df2 Add exit() at the end of programm 2021-09-17 16:34:51 +02:00
Yorick Barbanneau
34de202ded Change text for -c argument 2021-09-17 16:30:31 +02:00
Yorick Barbanneau
5de78910db Add verbose option 2021-09-17 16:19:26 +02:00
Yorick Barbanneau
9f40993a49 Add correct error message on unknown parameter 2021-09-17 16:16:45 +02:00
Yorick Barbanneau
4434b17035 change access() R_OK to F_OK for testing purpose 2021-09-17 16:09:51 +02:00