Skip to content

Commit

Permalink
Merge pull request #13 from BrigitteLPB/dev-merge
Browse files Browse the repository at this point in the history
final version
  • Loading branch information
BrigitteLPB authored Dec 19, 2021
2 parents ab4f439 + 3323455 commit 999e29c
Show file tree
Hide file tree
Showing 635 changed files with 207,677 additions and 54 deletions.
Empty file added .env
Empty file.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/.dist
/.vscode
/build
/build
.vscode
7 changes: 4 additions & 3 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"C:\\MinGW\\include",
"C:\\MinGW\\msys\\1.0\\include",
"C:\\MinGW\\msys\\1.0\\include\\sys"
"C:/MinGW/include",
"C:/MinGW/msys/1.0/include",
"${workspaceFolder}/libs/SDL2-2.0.18/i686-w64-mingw32/include/SDL2",
"${workspaceFolder}/libs/SDL2_image-2.0.5/i686-w64-mingw32/include/SDL2"
],
"defines": [
"_DEBUG",
Expand Down
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
],
"problemMatcher": [
"$go"
],
"dependsOn": [
"move assets"
]
},
{
Expand Down Expand Up @@ -86,6 +89,19 @@
"build"
],
"group": "build"
},
{
"label": "move assets",
"type": "shell",
"windows": {
"command": "echo robocopy && .vscode\\move_assets.windows.cmd"
},
"linux":{
"command": "rsync"
},
"problemMatcher": [
"$go"
],
},
{
"label": "clean",
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = .
INPUT = src

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
11 changes: 11 additions & 0 deletions INSTALL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ce fichier récapitule l'installation et la compilation.


AVEC CMAKE :
/!\ nécessite l'installation de CMake

Il faut lancé le fichier de commandes build_debug.cmd pour construire l'application en debug.
Pour une version de production lancé le fichier de commandes build.cmd

AVEC GCC :
seul le fichier de commandes build_gcc.cmd est disponnible, lancé le en console et déplacez-vous dans le dossier de build où l'application s'est compilée
Binary file added assets/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/draw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprite_O.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprite_X.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/win.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cmake -D INPUT_NAME=tictactoe -D CMAKE_BUILD_TYPE=Release -S ./ -B ./build -G "MinGW Makefiles"
cmake --build ./build
2 changes: 2 additions & 0 deletions build_debug.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cmake -D INPUT_NAME=tictactoe -D CMAKE_BUILD_TYPE=Debug -S ./ -B ./build -G "MinGW Makefiles"
cmake --build ./build
19 changes: 19 additions & 0 deletions build_gcc.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@REM clean
del .\\build /f /s /q

@REM Make build directory
mkdir build

@REM moving assets files
robocopy .\assets .\build\assets **.* /e /j /purge
if %ERRORLEVEL% GEQ 9 exit /b 1

@REM moving .dll
robocopy .\libs\SDL2-2.0.18\i686-w64-mingw32\bin .\build **.dll /j
if %ERRORLEVEL% GEQ 9 exit /b 1
robocopy .\libs\SDL2_image-2.0.5\i686-w64-mingw32\bin .\build **.dll /j
if %ERRORLEVEL% GEQ 9 exit /b 1


@REM GCC command
gcc src/main.c src/board.c src/assert_m.c src/board_view_sdl.c src/board_view_text.c src/game.c src/player_manager_mock.c src/player_manager_scanf.c src/player_manager_sdl.c src/test_CheckEndOfGame.c src/tictactoe_errors.c src/log.c -Ilibs\SDL2_image-2.0.5\i686-w64-mingw32\include\SDL2 -Ilibs\SDL2-2.0.18\i686-w64-mingw32\include\SDL2 -Llibs\SDL2-2.0.18\i686-w64-mingw32\lib -Llibs\SDL2_image-2.0.5\i686-w64-mingw32\lib -lSDL2main -lSDL2 -lSDL2_image -o build/tictactoe.exe
1 change: 1 addition & 0 deletions build_test.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gcc test/testSDL.c -Ilibs/SDL2-2.0.18/i686-w64-mingw32/include/SDL2 -Llibs/SDL2-2.0.18/i686-w64-mingw32/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -o build/testSDL.exe
1 change: 1 addition & 0 deletions clean.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
del .\\build /f /s /q
9 changes: 5 additions & 4 deletions cmakelists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ project(
#include dir
set(
INCLUDE_DIRS
"libs/SDL2-2.0.18"
"libs/SDL2_image-2.0.5"
"src"
)

Expand All @@ -23,15 +25,14 @@ enable_testing()
set(${PROJECT_NAME}_SOURCES "" CACHE INTERNAL "")

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")

include(CMAKE_PROJECT_GET_SOURCES_functions)

# Find threads num
include(ProcessorCount)
ProcessorCount(core_num)
message("<Working on ${core_num} threads processor>/n")
message("<Working on ${core_num} threads processor>")

# CODE
# CODE
say_path_to_root_cmake()

# Create the main exe
Expand All @@ -44,4 +45,4 @@ add_executable(

foreach(dir ${INCLUDE_DIRS})
add_subdirectory(${dir})
endforeach()
endforeach()
143 changes: 143 additions & 0 deletions doxygen/html/assert__m_8h.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Tic Tac Toe: src/assert_m.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Tic Tac Toe
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">assert_m.h File Reference</div> </div>
</div><!--header-->
<div class="contents">

<p>this file implement a file which throw message and kill
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdbool.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for assert_m.h:</div>
<div class="dyncontent">
<div class="center"><img src="assert__m_8h__incl.png" border="0" usemap="#src_2assert__m_8h" alt=""/></div>
</div>
</div>
<p><a href="assert__m_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae0d0fcd07a1e8d9c5eb54c8f8f55f6fe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="assert__m_8h.html#ae0d0fcd07a1e8d9c5eb54c8f8f55f6fe">assert_m</a> (bool condition, const char *message)</td></tr>
<tr class="memdesc:ae0d0fcd07a1e8d9c5eb54c8f8f55f6fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">throw the message if the condition is false <a href="assert__m_8h.html#ae0d0fcd07a1e8d9c5eb54c8f8f55f6fe">More...</a><br /></td></tr>
<tr class="separator:ae0d0fcd07a1e8d9c5eb54c8f8f55f6fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>this file implement a file which throw message and kill </p>
<dl class="section author"><dt>Author</dt><dd>BrigitteLPB </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2021-12-03 * </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (c) 2021 </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae0d0fcd07a1e8d9c5eb54c8f8f55f6fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0d0fcd07a1e8d9c5eb54c8f8f55f6fe">&#9670;&nbsp;</a></span>assert_m()</h2>

<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void assert_m </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>condition</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>message</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">

<p>throw the message if the condition is false </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">condition</td><td>the condition to test </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>the message to throw </td></tr>
</table>
</dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
9 changes: 9 additions & 0 deletions doxygen/html/assert__m_8h__incl.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
digraph "src/assert_m.h"
{
// LATEX_PDF_SIZE
edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"];
node [fontname="Helvetica",fontsize="10",shape=record];
Node1 [label="src/assert_m.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black",tooltip="this file implement a file which throw message and kill"];
Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
Node2 [label="stdbool.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",tooltip=" "];
}
90 changes: 90 additions & 0 deletions doxygen/html/assert__m_8h_source.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Tic Tac Toe: src/assert_m.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Tic Tac Toe
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">assert_m.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="assert__m_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="preprocessor">#ifndef ASSERT_M_H_</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor"> #define ASSERT_M_H_</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="preprocessor"> #include &lt;stdbool.h&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; <span class="keywordtype">void</span> <a class="code" href="assert__m_8h.html#ae0d0fcd07a1e8d9c5eb54c8f8f55f6fe">assert_m</a>(<span class="keywordtype">bool</span> condition, <span class="keyword">const</span> <span class="keywordtype">char</span>* message);</div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aassert__m_8h_html_ae0d0fcd07a1e8d9c5eb54c8f8f55f6fe"><div class="ttname"><a href="assert__m_8h.html#ae0d0fcd07a1e8d9c5eb54c8f8f55f6fe">assert_m</a></div><div class="ttdeci">void assert_m(bool condition, const char *message)</div><div class="ttdoc">throw the message if the condition is false</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
Binary file added doxygen/html/bc_s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doxygen/html/bdwn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 999e29c

Please sign in to comment.