Skip to content

Troy-Butler/Tortoise_vs_Hare_Race

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tortoise vs. Hare Race

This personal project is derived from a lab assignment issued to another Computer Science course at Clemson University (one that I did not take). The original lab assignment involved an object-based C++ program to simulate a race between a tortoise and a hare, with each participant represented by characters "T" and "H" respectively.

Once the race is initiated by the user, a racetrack is displayed and refreshed once per second with updated positions of each participant. The progress of each racer along the track is handled randomly, and each racer has the potential to advance forward or slip backward in varying degrees. Once a participant crosses the right-end of the racetrack, the game ends and the winner is announced.

As a test of my programming ability, I chose to adapt the lab assignment into the C programming language.

The game is composed of three files:

  • main.c (the driver for the game)
  • simulation.h (the header file for race functions)
  • simulation.c (the implementation file for race functions)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages