This repository contains the source code for the macOS
interpretition of the popular game Snake, built with SwiftUI
and TCA
.
Snake
is a retro arcade-style game, built in almost every programming language in existance, it's history is similar to that of Pong
. The whole application is powered by the Composable Architecture with a focus on composability, modularity, and testing.
-
HighScoreClient
Acts a database, with a getter and setter method to interact with the stored data which is just for this projects purpose: the
highscore. This, like the other dependencies, doesn't make any real world requests. Simply, this mimicks the structure of a potential RESTful API get and post request but instead of it being to a server, its just toUserDefaults
. So yes, this is just a controlled dependency wrapper for local storage, but this makes it testable and composable! -
CoordinateGenerator
Represents a third party system with a failable task to generate aCoordinate
inside of a player's game. This does not actually send a request outside of the system, it's a just to simulate a outside system request.