https://github.com/yanexr/trump-cards
A super-trump card game like Top Trumps built with Flutter.
https://github.com/yanexr/trump-cards
card-game dart flutter
Last synced: 4 months ago
JSON representation
A super-trump card game like Top Trumps built with Flutter.
- Host: GitHub
- URL: https://github.com/yanexr/trump-cards
- Owner: yanexr
- License: mit
- Created: 2023-10-11T20:18:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-21T11:15:10.000Z (4 months ago)
- Last Synced: 2025-01-21T12:19:58.858Z (4 months ago)
- Topics: card-game, dart, flutter
- Language: Dart
- Homepage: https://yanexr.github.io/trump-cards/
- Size: 43.9 MB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**Trump Cards** is a a _super-trump_ or _trump-quartet_ card game like _Top Trumps_, where players compare numerical values of various attributes (e.g., speed, power) on their cards. Players take turns selecting a category and comparing the chosen attribute. The player with the highest value wins the round and collects the opponents' cards. The player who has all the cards at the end of the game wins.
## Screenshots
![]()
## Features
- 9 different card decks (3 on the client and 6 on the server)
- Each card shows a number of attributes, a picture and a more detailed description on the back
- 10 different card design themes to choose from
- Supports different measurement systems (metric, imperial, ...)
- Singleplayer with different difficulty levels
- Online and offline multiplayer
- Card and card deck editor for creating custom cards and card decks
- Supports 12 different languages## Run the Code
The client is implemented in Dart/Flutter. The server (optional) is implemented in Python with WebSockets. Further details are available in the `README` files located in the [`client/`](client) and [`server/`](server) directories.## Data
There are 9 card decks: Cars, Airplanes and Rockets are located in [`client/assets/carddecks/`](client/assets/carddecks), and Animals, Dinosaurs, World Football Stars, World Tennis Stars, Extreme Sports and Mega Cities are located in [`server/data/`](server/data). A card deck is stored in a JSON file with the following structure:```json
{
"id": "number",
"name": "string",
"thumbnailPath": "string",
"backgroundPath": "string",
"characteristics": [
{
"measurementType": "string", // e.g., "mass", "velocity"
"isHigherBetter": "boolean",
"label": "string" // e.g., "Weight", "Speed"
}
],
"cards": [
{
"id": "number",
"name": "string",
"subtitle": "string",
"imagePath": "string",
"imageAttr": "string",
"imageLic": "string",
"values": ["number"] // e.g., [1.23, 4.56]
}
]
}
```To add a new card deck, create a new JSON file in the appropriate directory and add the card deck to the list of card decks in [`client/assets/carddecks/localCardDecks.json`](client/assets/carddecks/localCardDecks.json) or [`server/data/serverCardDecks.json`](server/data/serverCardDecks.json). Alternatively, a card deck can be created in the app using the card deck editor GUI or by importing a JSON file.
Image paths can be either URLs or local paths. Local images should be placed in [`client/assets/images//`](client/assets/images) and the new directory should be added to the list of assets in [`client/pubspec.yaml`](client/pubspec.yaml).