diff --git a/0 b/0 new file mode 100644 index 0000000..d7619da --- /dev/null +++ b/0 @@ -0,0 +1 @@ +Appuyez sur une touche pour continuer... \ No newline at end of file diff --git a/AfficheMenu/Quitter.txt b/AfficheMenu/Quitter.txt new file mode 100644 index 0000000..8f3d96c --- /dev/null +++ b/AfficheMenu/Quitter.txt @@ -0,0 +1,23 @@ +12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 99 + +12 12 15 12 15 12 12 12 15 15 15 12 12 15 15 12 12 12 15 15 12 12 15 15 15 12 99 +12 15 12 15 12 15 12 15 12 12 12 12 15 12 12 15 12 15 12 12 15 12 12 15 12 12 99 +12 15 12 15 12 15 12 15 15 15 12 12 15 15 15 12 12 15 12 12 12 12 12 15 12 12 99 +12 15 12 12 12 15 12 15 12 12 12 12 15 12 12 15 12 15 12 12 15 12 12 15 12 12 99 +12 15 12 12 12 15 12 12 15 15 15 12 15 12 12 15 12 12 15 15 12 12 15 15 15 12 99 + +12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 99 + +12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 12 12 15 15 12 12 12 15 15 12 12 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 12 15 15 15 15 12 15 15 15 15 12 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 15 15 15 15 15 15 15 15 15 15 15 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 15 15 15 15 15 15 15 15 15 15 15 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 15 15 15 15 15 15 15 15 15 15 15 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 15 15 15 15 15 15 15 15 15 15 15 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 12 15 15 15 15 15 15 15 15 15 12 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 12 12 15 15 15 15 15 15 15 12 12 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 12 12 12 15 15 15 15 15 12 12 12 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 12 12 12 12 15 15 15 12 12 12 12 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 12 12 12 12 12 15 12 12 12 12 12 12 12 12 12 12 12 12 99 +12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 99 \ No newline at end of file diff --git a/AfficheMenu/Taxon.txt b/AfficheMenu/Taxon.txt new file mode 100644 index 0000000..343a81d --- /dev/null +++ b/AfficheMenu/Taxon.txt @@ -0,0 +1,33 @@ +15 15 15 00 00 15 15 00 00 15 00 15 00 00 15 15 00 00 15 00 00 15 99 +00 15 00 00 15 00 00 15 00 15 00 15 00 15 00 00 15 00 15 00 00 15 99 +00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 15 15 00 15 99 +00 15 00 00 15 15 15 15 00 15 00 15 00 15 00 00 15 00 15 00 15 15 99 +00 15 00 00 15 00 00 15 00 15 00 15 00 00 15 15 00 00 15 00 00 15 99 + +99 + +15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 99 + +99 + +00 15 00 00 00 00 00 15 15 15 00 00 15 15 00 00 15 00 00 15 00 00 15 15 15 00 00 15 15 00 99 +15 15 00 00 00 00 00 00 00 15 00 15 00 00 15 00 15 00 00 15 00 15 00 00 00 00 15 00 00 15 99 +00 15 00 00 15 15 00 00 00 15 00 15 00 00 15 00 15 00 00 15 00 15 15 15 00 00 15 15 15 00 99 +00 15 00 00 00 00 00 15 00 15 00 15 00 00 15 00 15 00 00 15 00 15 00 00 00 00 15 00 00 15 99 +15 15 15 00 00 00 00 00 15 15 00 00 15 15 00 00 00 15 15 00 00 00 15 15 15 00 15 00 00 15 99 + +99 + +15 15 00 00 00 00 00 00 15 15 00 00 00 15 15 00 00 15 15 15 00 15 15 15 00 00 15 15 00 00 15 00 00 15 00 00 15 15 15 99 +00 00 15 00 00 00 00 15 00 00 15 00 15 00 00 15 00 00 15 00 00 00 15 00 00 15 00 00 15 00 15 00 00 15 00 15 00 00 00 99 +00 15 15 00 15 15 00 15 00 00 15 00 15 15 15 00 00 00 15 00 00 00 15 00 00 15 00 00 15 00 15 15 00 15 00 00 15 15 00 99 +15 00 00 00 00 00 00 15 00 00 15 00 15 00 00 00 00 00 15 00 00 00 15 00 00 15 00 00 15 00 15 00 15 15 00 00 00 00 15 99 +15 15 15 00 00 00 00 00 15 15 00 00 15 00 00 00 00 00 15 00 00 15 15 15 00 00 15 15 00 00 15 00 00 15 00 15 15 15 00 99 + +99 + +15 15 00 00 00 00 00 00 15 15 00 00 00 15 00 00 15 00 15 15 15 00 15 15 15 00 15 15 15 00 00 15 15 15 00 00 15 15 00 99 +00 00 15 00 00 00 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 00 15 00 00 00 15 00 00 15 00 00 00 00 15 00 00 15 99 +15 15 00 00 15 15 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 00 15 00 00 00 15 00 00 15 15 15 00 00 15 15 15 00 99 +00 00 15 00 00 00 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 00 15 00 00 00 15 00 00 15 00 00 00 00 15 00 00 15 99 +15 15 00 00 00 00 00 00 15 15 00 15 00 00 15 15 00 00 15 15 15 00 00 15 00 00 00 15 00 00 00 15 15 15 00 15 00 00 15 99 \ No newline at end of file diff --git a/AfficheMenu/TaxonOption1.txt b/AfficheMenu/TaxonOption1.txt new file mode 100644 index 0000000..394df42 --- /dev/null +++ b/AfficheMenu/TaxonOption1.txt @@ -0,0 +1,33 @@ +15 15 15 00 00 15 15 00 00 15 00 15 00 00 15 15 00 00 15 00 00 15 99 +00 15 00 00 15 00 00 15 00 15 00 15 00 15 00 00 15 00 15 00 00 15 99 +00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 15 15 00 15 99 +00 15 00 00 15 15 15 15 00 15 00 15 00 15 00 00 15 00 15 00 15 15 99 +00 15 00 00 15 00 00 15 00 15 00 15 00 00 15 15 00 00 15 00 00 15 99 + +99 + +15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 99 + +99 + +12 15 12 12 12 12 12 15 15 15 12 12 15 15 12 12 15 12 12 15 12 12 15 15 15 12 12 15 15 12 99 +15 15 12 12 12 12 12 12 12 15 12 15 12 12 15 12 15 12 12 15 12 15 12 12 12 12 15 12 12 15 99 +12 15 12 12 15 15 12 12 12 15 12 15 12 12 15 12 15 12 12 15 12 15 15 15 12 12 15 15 15 12 99 +12 15 12 12 12 12 12 15 12 15 12 15 12 12 15 12 15 12 12 15 12 15 12 12 12 12 15 12 12 15 99 +15 15 15 12 12 12 12 12 15 15 12 12 15 15 12 12 12 15 15 12 12 12 15 15 15 12 15 12 12 15 99 + +99 + +15 15 00 00 00 00 00 00 15 15 00 00 00 15 15 00 00 15 15 15 00 15 15 15 00 00 15 15 00 00 15 00 00 15 00 00 15 15 15 99 +00 00 15 00 00 00 00 15 00 00 15 00 15 00 00 15 00 00 15 00 00 00 15 00 00 15 00 00 15 00 15 00 00 15 00 15 00 00 00 99 +00 15 15 00 15 15 00 15 00 00 15 00 15 15 15 00 00 00 15 00 00 00 15 00 00 15 00 00 15 00 15 15 00 15 00 00 15 15 00 99 +15 00 00 00 00 00 00 15 00 00 15 00 15 00 00 00 00 00 15 00 00 00 15 00 00 15 00 00 15 00 15 00 15 15 00 00 00 00 15 99 +15 15 15 00 00 00 00 00 15 15 00 00 15 00 00 00 00 00 15 00 00 15 15 15 00 00 15 15 00 00 15 00 00 15 00 15 15 15 00 99 + +99 + +15 15 00 00 00 00 00 00 15 15 00 00 00 15 00 00 15 00 15 15 15 00 15 15 15 00 15 15 15 00 00 15 15 15 00 00 15 15 00 99 +00 00 15 00 00 00 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 00 15 00 00 00 15 00 00 15 00 00 00 00 15 00 00 15 99 +15 15 00 00 15 15 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 00 15 00 00 00 15 00 00 15 15 15 00 00 15 15 15 00 99 +00 00 15 00 00 00 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 00 15 00 00 00 15 00 00 15 00 00 00 00 15 00 00 15 99 +15 15 00 00 00 00 00 00 15 15 00 15 00 00 15 15 00 00 15 15 15 00 00 15 00 00 00 15 00 00 00 15 15 15 00 15 00 00 15 99 \ No newline at end of file diff --git a/AfficheMenu/TaxonOption2.txt b/AfficheMenu/TaxonOption2.txt new file mode 100644 index 0000000..e0fc5a5 --- /dev/null +++ b/AfficheMenu/TaxonOption2.txt @@ -0,0 +1,33 @@ +15 15 15 00 00 15 15 00 00 15 00 15 00 00 15 15 00 00 15 00 00 15 99 +00 15 00 00 15 00 00 15 00 15 00 15 00 15 00 00 15 00 15 00 00 15 99 +00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 15 15 00 15 99 +00 15 00 00 15 15 15 15 00 15 00 15 00 15 00 00 15 00 15 00 15 15 99 +00 15 00 00 15 00 00 15 00 15 00 15 00 00 15 15 00 00 15 00 00 15 99 + +99 + +15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 99 + +99 + +00 15 00 00 00 00 00 15 15 15 00 00 15 15 00 00 15 00 00 15 00 00 15 15 15 00 00 15 15 00 99 +15 15 00 00 00 00 00 00 00 15 00 15 00 00 15 00 15 00 00 15 00 15 00 00 00 00 15 00 00 15 99 +00 15 00 00 15 15 00 00 00 15 00 15 00 00 15 00 15 00 00 15 00 15 15 15 00 00 15 15 15 00 99 +00 15 00 00 00 00 00 15 00 15 00 15 00 00 15 00 15 00 00 15 00 15 00 00 00 00 15 00 00 15 99 +15 15 15 00 00 00 00 00 15 15 00 00 15 15 00 00 00 15 15 00 00 00 15 15 15 00 15 00 00 15 99 + +99 + +15 15 12 12 12 12 12 12 15 15 12 12 12 15 15 12 12 15 15 15 12 15 15 15 12 12 15 15 12 12 15 12 12 15 12 12 15 15 15 99 +12 12 15 12 12 12 12 15 12 12 15 12 15 12 12 15 12 12 15 12 12 12 15 12 12 15 12 12 15 12 15 12 12 15 12 15 12 12 12 99 +12 15 15 12 15 15 12 15 12 12 15 12 15 15 15 12 12 12 15 12 12 12 15 12 12 15 12 12 15 12 15 15 12 15 12 12 15 15 12 99 +15 12 12 12 12 12 12 15 12 12 15 12 15 12 12 12 12 12 15 12 12 12 15 12 12 15 12 12 15 12 15 12 15 15 12 12 12 12 15 99 +15 15 15 12 12 12 12 12 15 15 12 12 15 12 12 12 12 12 15 12 12 15 15 15 12 12 15 15 12 12 15 12 12 15 12 15 15 15 12 99 + +99 + +15 15 00 00 00 00 00 00 15 15 00 00 00 15 00 00 15 00 15 15 15 00 15 15 15 00 15 15 15 00 00 15 15 15 00 00 15 15 00 99 +00 00 15 00 00 00 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 00 15 00 00 00 15 00 00 15 00 00 00 00 15 00 00 15 99 +15 15 00 00 15 15 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 00 15 00 00 00 15 00 00 15 15 15 00 00 15 15 15 00 99 +00 00 15 00 00 00 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 00 15 00 00 00 15 00 00 15 00 00 00 00 15 00 00 15 99 +15 15 00 00 00 00 00 00 15 15 00 15 00 00 15 15 00 00 15 15 15 00 00 15 00 00 00 15 00 00 00 15 15 15 00 15 00 00 15 99 \ No newline at end of file diff --git a/AfficheMenu/TaxonOption3.txt b/AfficheMenu/TaxonOption3.txt new file mode 100644 index 0000000..3e18db6 --- /dev/null +++ b/AfficheMenu/TaxonOption3.txt @@ -0,0 +1,33 @@ +15 15 15 00 00 15 15 00 00 15 00 15 00 00 15 15 00 00 15 00 00 15 99 +00 15 00 00 15 00 00 15 00 15 00 15 00 15 00 00 15 00 15 00 00 15 99 +00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 00 15 00 15 15 00 15 99 +00 15 00 00 15 15 15 15 00 15 00 15 00 15 00 00 15 00 15 00 15 15 99 +00 15 00 00 15 00 00 15 00 15 00 15 00 00 15 15 00 00 15 00 00 15 99 + +99 + +15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 99 + +99 + +00 15 00 00 00 00 00 15 15 15 00 00 15 15 00 00 15 00 00 15 00 00 15 15 15 00 00 15 15 00 99 +15 15 00 00 00 00 00 00 00 15 00 15 00 00 15 00 15 00 00 15 00 15 00 00 00 00 15 00 00 15 99 +00 15 00 00 15 15 00 00 00 15 00 15 00 00 15 00 15 00 00 15 00 15 15 15 00 00 15 15 15 00 99 +00 15 00 00 00 00 00 15 00 15 00 15 00 00 15 00 15 00 00 15 00 15 00 00 00 00 15 00 00 15 99 +15 15 15 00 00 00 00 00 15 15 00 00 15 15 00 00 00 15 15 00 00 00 15 15 15 00 15 00 00 15 99 + +99 + +15 15 00 00 00 00 00 00 15 15 00 00 00 15 15 00 00 15 15 15 00 15 15 15 00 00 15 15 00 00 15 00 00 15 00 00 15 15 15 99 +00 00 15 00 00 00 00 15 00 00 15 00 15 00 00 15 00 00 15 00 00 00 15 00 00 15 00 00 15 00 15 00 00 15 00 15 00 00 00 99 +00 15 15 00 15 15 00 15 00 00 15 00 15 15 15 00 00 00 15 00 00 00 15 00 00 15 00 00 15 00 15 15 00 15 00 00 15 15 00 99 +15 00 00 00 00 00 00 15 00 00 15 00 15 00 00 00 00 00 15 00 00 00 15 00 00 15 00 00 15 00 15 00 15 15 00 00 00 00 15 99 +15 15 15 00 00 00 00 00 15 15 00 00 15 00 00 00 00 00 15 00 00 15 15 15 00 00 15 15 00 00 15 00 00 15 00 15 15 15 00 99 + +99 + +15 15 12 12 12 12 12 12 15 15 12 12 12 15 12 12 15 12 15 15 15 12 15 15 15 12 15 15 15 12 12 15 15 15 12 12 15 15 12 99 +12 12 15 12 12 12 12 15 12 12 15 12 12 15 12 12 15 12 12 15 12 12 12 15 12 12 12 15 12 12 15 12 12 12 12 15 12 12 15 99 +15 15 12 12 15 15 12 15 12 12 15 12 12 15 12 12 15 12 12 15 12 12 12 15 12 12 12 15 12 12 15 15 15 12 12 15 15 15 12 99 +12 12 15 12 12 12 12 15 12 12 15 12 12 15 12 12 15 12 12 15 12 12 12 15 12 12 12 15 12 12 15 12 12 12 12 15 12 12 15 99 +15 15 12 12 12 12 12 12 15 15 12 15 12 12 15 15 12 12 15 15 15 12 12 15 12 12 12 15 12 12 12 15 15 15 12 15 12 12 15 99 \ No newline at end of file diff --git a/Alphabet/Normal/A.txt b/Alphabet/Normal/A.txt new file mode 100644 index 0000000..b146704 --- /dev/null +++ b/Alphabet/Normal/A.txt @@ -0,0 +1,5 @@ +00 00 15 15 00 00 99 +00 15 00 00 15 00 99 +00 15 00 00 15 00 99 +00 15 15 15 15 00 99 +00 15 00 00 15 00 99 \ No newline at end of file diff --git a/Mots/mot3lettres.txt b/Mots/mot3lettres.txt new file mode 100644 index 0000000..c9e43f0 --- /dev/null +++ b/Mots/mot3lettres.txt @@ -0,0 +1,15 @@ +rue +mot +oie +une +roi +ile +nez +riz +pot +sol +mur +toi +moi +eux +mat \ No newline at end of file diff --git a/Taxon.sln b/Taxon.sln new file mode 100644 index 0000000..0018f84 --- /dev/null +++ b/Taxon.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36705.20 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Taxon", "Taxon.vcxproj", "{A239960E-86ED-4BDC-A491-E071ECE0494E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A239960E-86ED-4BDC-A491-E071ECE0494E}.Debug|x64.ActiveCfg = Debug|x64 + {A239960E-86ED-4BDC-A491-E071ECE0494E}.Debug|x64.Build.0 = Debug|x64 + {A239960E-86ED-4BDC-A491-E071ECE0494E}.Debug|x86.ActiveCfg = Debug|Win32 + {A239960E-86ED-4BDC-A491-E071ECE0494E}.Debug|x86.Build.0 = Debug|Win32 + {A239960E-86ED-4BDC-A491-E071ECE0494E}.Release|x64.ActiveCfg = Release|x64 + {A239960E-86ED-4BDC-A491-E071ECE0494E}.Release|x64.Build.0 = Release|x64 + {A239960E-86ED-4BDC-A491-E071ECE0494E}.Release|x86.ActiveCfg = Release|Win32 + {A239960E-86ED-4BDC-A491-E071ECE0494E}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {707E97BC-5C54-410A-B207-53FA5A78B103} + EndGlobalSection +EndGlobal diff --git a/Taxon.vcxproj b/Taxon.vcxproj new file mode 100644 index 0000000..2ccccb8 --- /dev/null +++ b/Taxon.vcxproj @@ -0,0 +1,143 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {a239960e-86ed-4bdc-a491-e071ece0494e} + Taxon + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Taxon.vcxproj.filters b/Taxon.vcxproj.filters new file mode 100644 index 0000000..fa9afe7 --- /dev/null +++ b/Taxon.vcxproj.filters @@ -0,0 +1,68 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {96304bad-d194-479c-acaa-959c53a66bdd} + + + {df2ed3d4-f003-4ddf-afbb-9da73c17e1f3} + + + {8064397c-076b-4f78-81d1-972b604b522d} + + + {833d80c9-3c2f-493f-a670-3578c6c38820} + + + {219b9b47-768d-4ad2-bc5e-06f9906b7902} + + + {0e8fa072-7227-45e7-9f12-72b6afa5933f} + + + + + Fichiers sources + + + Fichiers sources + + + + + Fichiers d%27en-tête + + + + + Fichiers de ressources\AfficheMenu + + + Fichiers de ressources\AfficheMenu + + + Fichiers de ressources\AfficheMenu + + + Fichiers de ressources\AfficheMenu + + + Fichiers de ressources\Alphabet\Normal + + + Fichiers de ressources\AfficheMenu + + + \ No newline at end of file diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..4dc4d5d --- /dev/null +++ b/main.cpp @@ -0,0 +1,63 @@ +/*==================================== +AUTEUR : Jérémy Hébert & William Godin +PROJET : Taxon +NOM DU FICHIER : main.cpp +DATE : 17 novembre 2025 +BUT : Rassemble les appels de fonction de Taxon +====================================*/ + +//Librairies +#include +#include +#include +#include +#include +#include "mesFonctions.h" + +//Déclaration des namespaces +using namespace std; + +//Déclaration du main +int main() { + srand(time(NULL)); + HANDLE hconsole = GetStdHandle(STD_OUTPUT_HANDLE); //Déclaration de variable pour les images + + bool quitter = false; //Quitter le jeu + int nbMot3lettre = 15; //Nombre de mot présent dans le fichier + int temp = 0; //Variable temporaire + + while (quitter == false) { + curseur(false); + afficherMenu("AfficheMenu/Taxon.txt"); + + int choixMenu = _getch(); + + switch (choixMenu) { + case '1': + afficherMenu("AfficheMenu/TaxonOption1.txt"); + delai(); + curseur(true); + choisirMot("Mots/mot3lettres.txt", nbMot3lettre); + break; + + case '2': + afficherMenu("AfficheMenu/TaxonOption2.txt"); + delai(); + curseur(true); + temp = demanderBackground(); + background(temp); + break; + + case '3': + afficherMenu("AfficheMenu/TaxonOption3.txt"); + delai(); + background('1'); + afficherMenu("AfficheMenu/Quitter.txt"); + quitter = true; + break; + } + + system("PAUSE>0"); + system("cls"); + } +} \ No newline at end of file diff --git a/mesFonctions.cpp b/mesFonctions.cpp new file mode 100644 index 0000000..21e727f --- /dev/null +++ b/mesFonctions.cpp @@ -0,0 +1,148 @@ +/*==================================== +AUTEUR : Jérémy Hébert & William Godin +PROJET : Taxon +NOM DU FICHIER : mesFonctions.cpp +DATE : 17 novembre 2025 +BUT : Contient la définition des fonctions déclarées dans le fichier d’en-tête +====================================*/ + +//Librairies +#include +#include +#include +#include +#include +#include +#include "mesFonctions.h" + +using namespace std; + +#include +#include +using namespace std::chrono_literals; + +#include //Sources : https://www.tutorialspoint.com/cpp_standard_library/limits.htm et https://stackoverflow.com/questions/2158943/split-string-into-array-of-chars + + +/*==================================== +MENU +====================================*/ +void afficherMenu(string nomFichier) { + fstream monFlux; + system("cls"); + ouvrirFichier(monFlux, nomFichier); + afficherImage(monFlux); + fermerFichier(monFlux); +} + +void ouvrirFichier(fstream& monFlux, string nomFichier) { + monFlux.open(nomFichier, ios::in); + if (!monFlux) { + cout << "Une erreur est survenue ! Veuillez relancer le programme."; + exit(1); + } +} + +void afficherImage(fstream& monFlux) { + const char carre = 219; + + HANDLE hconsole = GetStdHandle(STD_OUTPUT_HANDLE); //Déclaration de variable pour les images + + while (!monFlux.eof()) { + int val = 0; + monFlux >> val; + if (val == 99) { + cout << endl; + + } + else { + SetConsoleTextAttribute(hconsole, val); + cout << carre << carre; + } + } + SetConsoleTextAttribute(hconsole, 15); +} + +void fermerFichier(fstream& monFlux) { + monFlux.close(); +} + +void delai() { + // Source : https://search.brave.com/search?q=comment+ajouter+du+delai+avant+une+instruction+en+cpp&conversation=ee2f26795aae1fe85434f1&summary=1 + this_thread::sleep_for(0.3s); +} + +void curseur(bool interrupteur) { + // Source : https://search.brave.com/search?q=comment+cacher+notre+curseur+dans+la+console+en+cpp&summary=1&conversation=c93091ff881c9c38dfd1a2 + HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); + CONSOLE_CURSOR_INFO cci; + GetConsoleCursorInfo(hConsole, &cci); + cci.bVisible = interrupteur; + SetConsoleCursorInfo(hConsole, &cci); +} + + + +/*==================================== +1 - JOUER +====================================*/ +//fonction pour choisir le mot de facon random +void choisirMot(string nomFichier, int maximum) { + + int numeroLigne = rand() % (maximum)+1; + + fstream monFlux; + ouvrirFichier(monFlux, nomFichier); + string mot = goToLine(monFlux, numeroLigne); + fermerFichier(monFlux); + cout << numeroLigne << " " << mot; +} +string goToLine(fstream& monFlux, int numeroLigne) { + string mot; + for (int i = 0; i < numeroLigne; i++) { + getline(monFlux, mot); + } + return mot; +} + +/*==================================== +2 - OPTIONS +====================================*/ +void background(int couleur) { + HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); + switch (couleur) { + case '1': + SetConsoleTextAttribute(hConsole, BACKGROUND_RED | BACKGROUND_INTENSITY); + break; + + case '2': + SetConsoleTextAttribute(hConsole, BACKGROUND_RED); + break; + + case '3': + SetConsoleTextAttribute(hConsole, BACKGROUND_BLUE); + break; + + case '4': + SetConsoleTextAttribute(hConsole, BACKGROUND_GREEN); + break; + + case '5': + //SetConsoleTextAttribute(hConsole, BACKGROUND_RED | BACKGROUND_INTENSITY); + break; + + case '6': + //SetConsoleTextAttribute(hConsole, BACKGROUND_RED | BACKGROUND_INTENSITY); + break; + + default: + SetConsoleTextAttribute(hConsole, BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY); + } +} + +int demanderBackground() { + system("cls"); + cout << "Choix"; + int choix = _getche(); + return choix; +} \ No newline at end of file diff --git a/mesFonctions.h b/mesFonctions.h new file mode 100644 index 0000000..0084ed4 --- /dev/null +++ b/mesFonctions.h @@ -0,0 +1,32 @@ +/*==================================== +AUTEUR : Jérémy Hébert & William Godin +PROJET : Taxon +NOM DU FICHIER : mesFonctions.h +DATE : 17 novembre 2025 +BUT : Contient la déclaration (prototype) des fonctions utiliser pour Taxon +====================================*/ + +#pragma once + +//Librairies +#include +#include +#include +#include +#include + +using namespace std; + +//Affichage du logo +void afficherMenu(string nomFichier); +void ouvrirFichier(fstream& monFlux, string nomFichier); +void afficherImage(fstream& monFlux); +void fermerFichier(fstream& monFlux); +void delai(); +void curseur(bool interrupteur); +void background(int couleur); +int demanderBackground(); + +// Mot +void choisirMot(string nomFichier, int maximum); +string goToLine(fstream& monFlux, int numeroLigne); \ No newline at end of file