Our solution for the lecture FOOP (Advanced Object Oriented Programming) 2023 at TU Wien. We also wrote two single player versions one in Eiffel and one in Smalltalk.
This repository contains the source code for the "Cat Me If U Can" game, which includes a server/backend, client, and a shared library.
The server can be compiled for macOS, Linux and Windows.
cd Backend
swift run
The local server will listen on port 8080
.
The client is a native macOS app written with SwiftUI.
Open the project in XCode and select "Client" as the target on the top.
Note: If you want to use a local server instead of the hosted one in the
client you need to change in Client/dev.xcconfig
the host field
to WS_HOST = localhost:8080
.
The repository is organized into the following directories:
Backend/
: Contains the Vapor backend server for the game.Client/
: Contains the SwiftUI-based frontend client for the game.Shared/
: Contains the shared library with common code used by both the server and client.
The Shared library provides common data structures, utilities, and game logic used by both the server and client components of the "Cat Me If U Can" game. The library helps maintain consistency between the server and client and allows for easy code sharing between the two components.
Some of the main types and functionality provided by the Shared library include:
Protocol
: Includes types related to the communication protocol between the server and clients, such as messages, actions, updates, and errors.Utilities
: Contains helper functions and extensions used throughout the game, such as vector operations, calculations, and other utility methods.
For more information read the README of the shared library.
We format the codebase with Apples swift-format.
You can format the whole codebase with:
swift-format format -r -i .