Skip to content

Jozott00/cat_me_if_u_can

Repository files navigation

Cat Me If U Can

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.

Screenshot

This repository contains the source code for the "Cat Me If U Can" game, which includes a server/backend, client, and a shared library.

Run the Server

The server can be compiled for macOS, Linux and Windows.

cd Backend
swift run

The local server will listen on port 8080.

Run the Client

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.

Repository Structure

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.

Shared Library

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.

Contents of Shared Library

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.

Development

We format the codebase with Apples swift-format.

You can format the whole codebase with:

swift-format format -r -i .

Or use extensions for VSCode and XCode

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •