https://github.com/georgiosioannoucoder/tortoise-and-hare
Tortoise and Hare Implementation Using Java 8. ๐ข๐
https://github.com/georgiosioannoucoder/tortoise-and-hare
java-8 java8 tortoise-and-hare
Last synced: 2 months ago
JSON representation
Tortoise and Hare Implementation Using Java 8. ๐ข๐
- Host: GitHub
- URL: https://github.com/georgiosioannoucoder/tortoise-and-hare
- Owner: GeorgiosIoannouCoder
- License: mit
- Created: 2024-01-17T15:40:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-17T21:01:58.000Z (over 1 year ago)
- Last Synced: 2025-01-22T21:32:41.246Z (4 months ago)
- Topics: java-8, java8, tortoise-and-hare
- Language: Java
- Homepage:
- Size: 1.13 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# The Tortoise and the Hare | A Race Simulation
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
[![GitHub][github-shield]][github-url]
![]()
The Tortoise and the Hare
In this assignment, I recreated a version of the classic race of the tortoise and the hare. Using a random number generator to simulate the race. The contenders begin race along a track of 100 squares. Each square represents a possible position along the race course. The finish line is at square 100. The first contender to reach or pass square 100 wins. The course weaves its way up the side of a slippery mountain, so occasionally the contenders lose ground. A clock ticks once per second. With each tick of the clock, your application should adjust the position of the animals according to the rules found in the Requirements. Variables keep track of the positions of the animals (i.e., position numbers are 1โ100). Start each animal at position 1 (the "starting gate"). If an animal slips before square 1, move it back to square 1.
Explore the docs ยป
Report Bug
ยท
Request Feature
Table of Contents
## About The Project
## Requirements
You can find the requirements of this assignment [here](https://github.com/GeorgiosIoannouCoder/tortoise-and-hare/blob/main/Ioannou_Tortoise_And_Hare_Requirements.pdf).
### Built With
[![Java][Java]][Java-url]
[![IntelliJIDEA][IntelliJIDEA]][IntelliJIDEA-url]
[![Git][Git]][Git-url]## Getting Started
**To get a local copy of this project up and running locally follow these simple example steps:**
### Prerequisites
**NOTE:** How to check if Git is installed and what is its version
```sh
git -v
```1. Please make sure you have git installed
- Windows: [https://git-scm.com/download/win](https://git-scm.com/download/win)
- Mac: [https://git-scm.com/download/mac](https://git-scm.com/download/mac)
- Linux: [https://git-scm.com/download/linux](https://git-scm.com/download/linux)2. Please make sure you have [IntelliJ IDEA](https://www.jetbrains.com/idea/) installed. You can download IntelliJ IDEA [here](https://www.jetbrains.com/idea/download/).
***NOTE: You can use whatever code editor that you want. This project was created and tested with IntelliJ IDEA.***
### SetUp
1. Navigate to the directory where you want to clone/run/save the application
```sh
cd your_selected_directory
```2. Clone this repository
```sh
git clone https://github.com/GeorgiosIoannouCoder/tortoise-and-hare.git
```3. Navigate to the tortoise-and-hare git repository
```sh
cd tortoise-and-hare
```4. Open your file explorer
```sh
start .
```5. Open IntelliJ IDEA.
6. Click on open/import an existing in IntelliJ IDEA.
7. Open the Ioannou_Tortoise_And_Hare directory found inside thh tortoise-and-hare directory from steps 3 and 4 inside IntelliJ IDEA.
8. Run the application inside IntelliJ IDEA. The main function to run the application is in this [file](https://github.com/GeorgiosIoannouCoder/tortoise-and-hare/blob/main/Ioannou_Tortoise_And_Hare/src/Ioannou_Tortoise_And_Hare.java).
## Code
The main code file can be found [here](https://github.com/GeorgiosIoannouCoder/tortoise-and-hare/blob/main/Ioannou_Tortoise_And_Hare/src/Ioannou_Tortoise_And_Hare.java).
## Demo
https://github.com/GeorgiosIoannouCoder/tortoise-and-hare/assets/110848236/3415e95d-55cf-4f7f-88bd-d0ca45615df3
## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request## License
Distributed under the MIT License. See [LICENSE](https://github.com/GeorgiosIoannouCoder/tortoise-and-hare/blob/master/LICENSE) for more information.
MIT License
Copyright (c) 2021 Georgios Ioannou
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.## Contact
Georgios Ioannou - [@LinkedIn](https://linkedin.com/in/georgiosioannoucoder)
Georgios Ioannou - [@georgiosioannoucoder](https://georgiosioannoucoder.github.io/) - Please contact me via the form in my portfolio.
Project Link: [https://github.com/GeorgiosIoannouCoder/tortoise-and-hare](https://github.com/GeorgiosIoannouCoder/tortoise-and-hare)
[contributors-shield]: https://img.shields.io/github/contributors/GeorgiosIoannouCoder/tortoise-and-hare.svg?style=for-the-badge
[contributors-url]: https://github.com/GeorgiosIoannouCoder/tortoise-and-hare/graphs/contributors[forks-shield]: https://img.shields.io/github/forks/GeorgiosIoannouCoder/tortoise-and-hare.svg?style=for-the-badge
[forks-url]: https://github.com/GeorgiosIoannouCoder/tortoise-and-hare/network/members[stars-shield]: https://img.shields.io/github/stars/GeorgiosIoannouCoder/tortoise-and-hare.svg?style=for-the-badge
[stars-url]: https://github.com/GeorgiosIoannouCoder/tortoise-and-hare/stargazers[issues-shield]: https://img.shields.io/github/issues/GeorgiosIoannouCoder/tortoise-and-hare.svg?style=for-the-badge
[issues-url]: https://github.com/GeorgiosIoannouCoder/tortoise-and-hare/issues[license-shield]: https://img.shields.io/github/license/GeorgiosIoannouCoder/tortoise-and-hare.svg?style=for-the-badge
[license-url]: https://github.com/GeorgiosIoannouCoder/tortoise-and-hare/blob/master/LICENSE[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=0077B5
[linkedin-url]: https://linkedin.com/in/georgiosioannoucoder[github-shield]: https://img.shields.io/badge/-GitHub-black.svg?style=for-the-badge&logo=github&colorB=000
[github-url]: https://github.com/GeorgiosIoannouCoder/[Java]: https://img.shields.io/badge/java-5382a1?style=for-the-badge&logo=openjdk&logoColor=f89820
[Java-url]: https://www.java.com/[IntelliJIDEA]: https://img.shields.io/badge/intellij%20idea-000000?style=for-the-badge&logo=intellijidea&logoColor=
[IntelliJIDEA-url]: https://www.jetbrains.com/idea/[Git]: https://img.shields.io/badge/git-000000?style=for-the-badge&logo=git&logoColor=orange
[Git-url]: https://git-scm.com/