Skip to content

Commit

Permalink
Added 03-infinite-monkeys example game
Browse files Browse the repository at this point in the history
This isn't really a game, more of an exercise of that age old question...
  • Loading branch information
slouken committed Oct 29, 2024
1 parent ab3b89f commit 17852e1
Show file tree
Hide file tree
Showing 5 changed files with 410 additions and 0 deletions.
11 changes: 11 additions & 0 deletions VisualC/SDL.sln
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03-load-wav", "examples\aud
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "02-woodeneye-008", "examples\game\02-woodeneye-008\02-woodeneye-008.vcxproj", "{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "03-infinite-monkeys", "examples\game\03-infinite-monkeys\03-infinite-monkeys.vcxproj", "{75AEE75A-C016-4497-960B-D767B822237D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Expand Down Expand Up @@ -505,6 +507,14 @@ Global
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}.Release|Win32.Build.0 = Release|Win32
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}.Release|x64.ActiveCfg = Release|x64
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60}.Release|x64.Build.0 = Release|x64
{75AEE75A-C016-4497-960B-D767B822237D}.Debug|Win32.ActiveCfg = Debug|Win32
{75AEE75A-C016-4497-960B-D767B822237D}.Debug|Win32.Build.0 = Debug|Win32
{75AEE75A-C016-4497-960B-D767B822237D}.Debug|x64.ActiveCfg = Debug|x64
{75AEE75A-C016-4497-960B-D767B822237D}.Debug|x64.Build.0 = Debug|x64
{75AEE75A-C016-4497-960B-D767B822237D}.Release|Win32.ActiveCfg = Release|Win32
{75AEE75A-C016-4497-960B-D767B822237D}.Release|Win32.Build.0 = Release|Win32
{75AEE75A-C016-4497-960B-D767B822237D}.Release|x64.ActiveCfg = Release|x64
{75AEE75A-C016-4497-960B-D767B822237D}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -561,6 +571,7 @@ Global
{CC0714AA-8A81-4E29-BEC5-2E4FBC50E7FE} = {F91DDAF0-B74F-4516-A1A9-42ED8DFCBF6A}
{608C6C67-7766-471F-BBFF-8B00086039AF} = {1B61A1B7-92DE-4C37-9151-D2928D6449AB}
{A3F601E0-B54C-4DD8-8A97-FDEF7624EE60} = {D1BF59F6-22DC-493B-BDEB-451A50DA793D}
{75AEE75A-C016-4497-960B-D767B822237D} = {D1BF59F6-22DC-493B-BDEB-451A50DA793D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C320C9F2-1A8F-41D7-B02B-6338F872BCAD}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{75AEE75A-C016-4497-960B-D767B822237D}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemGroup>
<None Include="$(SolutionDir)\..\examples\game\03-infinite-monkeys\README.txt" />
<ClCompile Include="$(SolutionDir)\..\examples\game\03-infinite-monkeys\*.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ add_sdl_example_executable(camera-read-and-draw SOURCES camera/01-read-and-draw/
add_sdl_example_executable(pen-drawing-lines SOURCES pen/01-drawing-lines/drawing-lines.c)
add_sdl_example_executable(game-snake SOURCES game/01-snake/snake.c)
add_sdl_example_executable(game-woodeneye-008 SOURCES game/02-woodeneye-008/woodeneye-008.c)
add_sdl_example_executable(game-infinite-monkeys SOURCES game/03-infinite-monkeys/infinite-monkeys.c)

# When you add an example, remember to add the Visual Studio project as well:
# - Add a new example in examples/
Expand Down
7 changes: 7 additions & 0 deletions examples/game/03-infinite-monkeys/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

How many monkeys does it take to write the complete works of Shakespeare?

Now you can find out!

Cheer on your favorite monkey as they bash keyboards on their way through classic literature.

Loading

0 comments on commit 17852e1

Please sign in to comment.