This project is an example implementation of a game similar to Connect 4 using SwiftUI. The main goal is to provide an interactive game between a human player and the machine, along with the ability to store and display results of previous games.
- Connect 4 Game: The application features a classic Connect 4 game where a human player competes against the machine on an interactive game board.
- Two TabBars: The application utilizes two tabs for better organization and user experience. One tab focuses on a gameplay, while the other displays a history of results.
- Results History: In the results tab, a list of previous games is shown, including information such as the winner, date and time of the game, as well as its duration.
- Clean Architecture: The project follows the principles of Clean Architecture to ensure clear separation of concerns and easy scalability and maintenance of the codebase.
- SOLID Principles: SOLID principles are applied to promote clean, flexible, and extensible code design.
- Data Persistence with SwiftData: For storing game results, SwiftData, a Swift data persistence library providing a simple and efficient solution, has been integrated.
Simulator.mp4
- iOS 17
- Clone or download the repository to your local machine.
- Open the project in Xcode.
- Build and run the application on an iOS simulator or device.
- Upon launching the application, you can select between the two tabs at the bottom to play or view results.
- In the game tab, you can interact with the board to place your chips and play against the machine.
- In the results tab, a list of previous games along with their corresponding information is displayed.
Contributions are welcome! If you would like to contribute to this project, please open an issue to discuss the proposed changes or submit a pull request with your enhancements.
This project is licensed under the MIT License.