Skip to content

Commit 087447f

Browse files
committed
First PizzaVsCats version in Flutter
1 parent 32e12ba commit 087447f

File tree

133 files changed

+5389
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+5389
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build Pizza Vs Cats Release Artifact
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
- uses: actions/checkout@v5.0.0
14+
- uses: actions/setup-java@v5.0.0
15+
with:
16+
java-version: '17.x'
17+
distribution: 'temurin'
18+
19+
- uses: subosito/flutter-action@v2.14.0
20+
with:
21+
channel: 'beta'
22+
23+
- run: flutter pub get
24+
25+
- run: flutter build apk --release
26+
27+
- uses: actions/upload-artifact@v4.6.2
28+
with:
29+
name: PizzaVsCats.apk
30+
path: build/app/outputs/apk/release/app-release.apk

.gitignore

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# Do not remove or rename entries in this file, only add new ones
2+
# See https://github.com/flutter/flutter/issues/128635 for more context.
3+
4+
# Miscellaneous
5+
*.class
6+
*.lock
7+
*.log
8+
*.pyc
9+
*.swp
10+
.DS_Store
11+
.atom/
12+
.buildlog/
13+
.history
14+
.svn/
15+
16+
# As packages are no longer pinned, we use a lockfile for testing locally.
17+
# When unpinning packages, Using lockfiles ensures that failures in PRs are
18+
# actually due to those PRs, not due to a package being updated.
19+
!/pubspec.lock
20+
21+
# IntelliJ related
22+
*.iml
23+
*.ipr
24+
*.iws
25+
.idea/
26+
27+
# Visual Studio Code related
28+
.classpath
29+
.project
30+
.settings/
31+
.vscode/*
32+
.ccls-cache
33+
34+
# This file, on the master branch, should never exist or be checked-in.
35+
#
36+
# On a *final* release branch, that is, what will ship to stable or beta, the
37+
# file can be force added (git add --force) and checked-in in order to effectively
38+
# "pin" the engine artifact version so the flutter tool does not need to use git
39+
# to determine the engine artifacts.
40+
#
41+
# See https://github.com/flutter/flutter/blob/main/docs/tool/Engine-artifacts.md.
42+
/bin/internal/engine.version
43+
44+
# Flutter repo-specific
45+
/bin/cache/
46+
/bin/internal/bootstrap.bat
47+
/bin/internal/bootstrap.sh
48+
/bin/internal/engine.realm
49+
/bin/mingit/
50+
/dev/benchmarks/mega_gallery/
51+
/dev/bots/.recipe_deps
52+
/dev/bots/android_tools/
53+
/dev/devicelab/ABresults*.json
54+
/dev/docs/doc/
55+
/dev/docs/api_docs.zip
56+
/dev/docs/flutter.docs.zip
57+
/dev/docs/lib/
58+
/dev/docs/pubspec.yaml
59+
/dev/integration_tests/**/xcuserdata
60+
/dev/integration_tests/**/Pods
61+
/packages/flutter/coverage/
62+
version
63+
analysis_benchmark.json
64+
65+
# packages file containing multi-root paths
66+
.packages.generated
67+
68+
# Flutter/Dart/Pub related
69+
**/doc/api/
70+
.dart_tool/
71+
.flutter-plugins-dependencies
72+
**/generated_plugin_registrant.dart
73+
.packages
74+
.pub-preload-cache/
75+
.pub-cache/
76+
.pub/
77+
build/
78+
flutter_*.png
79+
linked_*.ds
80+
unlinked.ds
81+
unlinked_spec.ds
82+
83+
# Android related
84+
**/android/**/gradle-wrapper.jar
85+
.gradle/
86+
**/android/captures/
87+
**/android/gradlew
88+
**/android/gradlew.bat
89+
**/android/**/GeneratedPluginRegistrant.java
90+
**/android/key.properties
91+
*.jks
92+
local.properties
93+
**/.cxx/
94+
95+
# iOS/XCode related
96+
**/ios/**/*.mode1v3
97+
**/ios/**/*.mode2v3
98+
**/ios/**/*.moved-aside
99+
**/ios/**/*.pbxuser
100+
**/ios/**/*.perspectivev3
101+
**/ios/**/*sync/
102+
**/ios/**/.sconsign.dblite
103+
**/ios/**/.tags*
104+
**/ios/**/.vagrant/
105+
**/ios/**/DerivedData/
106+
**/ios/**/Icon?
107+
**/ios/**/Pods/
108+
**/ios/**/.symlinks/
109+
**/ios/**/profile
110+
**/ios/**/xcuserdata
111+
**/ios/.generated/
112+
**/ios/Flutter/.last_build_id
113+
**/ios/Flutter/App.framework
114+
**/ios/Flutter/Flutter.framework
115+
**/ios/Flutter/Flutter.podspec
116+
**/ios/Flutter/Generated.xcconfig
117+
**/ios/Flutter/ephemeral
118+
**/ios/Flutter/app.flx
119+
**/ios/Flutter/app.zip
120+
**/ios/Flutter/flutter_assets/
121+
**/ios/Flutter/flutter_export_environment.sh
122+
**/ios/ServiceDefinitions.json
123+
**/ios/Runner/GeneratedPluginRegistrant.*
124+
125+
# macOS
126+
**/Flutter/ephemeral/
127+
**/Pods/
128+
**/macos/Flutter/GeneratedPluginRegistrant.swift
129+
**/macos/Flutter/ephemeral
130+
**/xcuserdata/
131+
132+
# Windows
133+
**/windows/flutter/ephemeral/
134+
**/windows/flutter/generated_plugin_registrant.cc
135+
**/windows/flutter/generated_plugin_registrant.h
136+
**/windows/flutter/generated_plugins.cmake
137+
138+
# Linux
139+
**/linux/flutter/ephemeral/
140+
**/linux/flutter/generated_plugin_registrant.cc
141+
**/linux/flutter/generated_plugin_registrant.h
142+
**/linux/flutter/generated_plugins.cmake
143+
144+
# Coverage
145+
coverage/
146+
147+
# Symbols
148+
app.*.symbols
149+
150+
# Exceptions to above rules.
151+
!**/ios/**/default.mode1v3
152+
!**/ios/**/default.mode2v3
153+
!**/ios/**/default.pbxuser
154+
!**/ios/**/default.perspectivev3
155+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
156+
!/dev/ci/**/Gemfile.lock
157+
!.vscode/settings.json
158+
159+
# Monorepo
160+
.cipd
161+
.gclient
162+
.gclient_entries
163+
.python-version
164+
.gclient_previous_custom_vars
165+
.gclient_previous_sync_commits

.metadata

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled.
5+
6+
version:
7+
revision: 796c8ef79279f9c774545b3771238c3098dbefab
8+
channel: stable
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
17+
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
18+
- platform: android
19+
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
20+
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
21+
- platform: ios
22+
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
23+
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
24+
- platform: web
25+
create_revision: 796c8ef79279f9c774545b3771238c3098dbefab
26+
base_revision: 796c8ef79279f9c774545b3771238c3098dbefab
27+
28+
# User provided section
29+
30+
# List of Local paths (relative to this file) that should be
31+
# ignored by the migrate tool.
32+
#
33+
# Files that are not part of the templates will be ignored by default.
34+
unmanaged_files:
35+
- 'lib/main.dart'
36+
- 'ios/Runner.xcodeproj/project.pbxproj'

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Decide… pizza or cats?
2+
3+
>_Would you live in a world without pizzas or without cat memes? You vote. Other people vote.
4+
The majority decides._
5+
6+
# The game
7+
**PizzaVersusCats** is a card game.
8+
9+
You have five cards in your hand; each one could represent anything.
10+
11+
Let’s say you start a game and you these five cards in your hand:
12+
_rainbow_, _Ariana Grande_, a _mushroom_, a _cat_, and _Paolo Brosio_.
13+
14+
Your opponent plays a card showing a _pizza_, and you decide to fight it using your _cat_ card.
15+
The game will tell you which one is strongest, the _pizza_ or the _cat_. Good luck!
16+
17+
# More details ...
18+
1. You can decide the number of players and how many cards to give to each player.
19+
2. At each round, everyone plays a card in sequential order, and the game tells you which one
20+
is the best.
21+
3. The cards used in the round go in the main deck.
22+
4. The player who played the **best** card does **not** pick a new one, while the other players
23+
must take a new random card from the main deck.
24+
5. The winner is the first one remaining without cards.
25+
26+
## Which cards are in the game?
27+
The community decides which cards are in the game by adding cards to the decks.
28+
29+
You can create as many decks as you want with as many cards as you want.
30+
For instance, you can create a deck with animals, a deck with celebrities, a deck with food,
31+
or a deck with completely random objects.
32+
33+
## How PizzaVersusCats knows which card is stronger?
34+
An algorithm gives a ranking to each card using players answers to “this or that questions”.
35+
36+
Indeed, before or after each match, a user must answer questions about couples of cards
37+
randomly chosen from the cards database.
38+
39+
For instance: Pizza or cat memes? Coke or Pepsi? Java or C++? Pippo Baudo or Paolo Brosio?
40+
41+
You vote, and **PizzaVersusCats** remembers all the votes and ranks all the cards!
42+
43+
# Installation
44+
45+
The game is available for Android devices. You can download the `PizzaVsCats.apk` artifact from
46+
GitHub and test it on your Android device.
47+
48+
There is also a command line version written in Python, available in the
49+
`python_command_line_project` folder.

analysis_options.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules.dart applied to this project can be customized in the
14+
# section below to disable rules.dart from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules.dart. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

android/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks

android/app/build.gradle

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
7+
def localProperties = new Properties()
8+
def localPropertiesFile = rootProject.file('local.properties')
9+
if (localPropertiesFile.exists()) {
10+
localPropertiesFile.withReader('UTF-8') { reader ->
11+
localProperties.load(reader)
12+
}
13+
}
14+
15+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16+
if (flutterVersionCode == null) {
17+
flutterVersionCode = '1'
18+
}
19+
20+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
21+
if (flutterVersionName == null) {
22+
flutterVersionName = '1.0'
23+
}
24+
25+
android {
26+
namespace "com.example.pizza_vs_cats"
27+
compileSdkVersion flutter.compileSdkVersion
28+
ndkVersion flutter.ndkVersion
29+
30+
compileOptions {
31+
sourceCompatibility JavaVersion.VERSION_1_8
32+
targetCompatibility JavaVersion.VERSION_1_8
33+
}
34+
35+
kotlinOptions {
36+
jvmTarget = '1.8'
37+
}
38+
39+
sourceSets {
40+
main.java.srcDirs += 'src/main/kotlin'
41+
}
42+
43+
defaultConfig {
44+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45+
applicationId "com.example.pizza_vs_cats"
46+
// You can update the following values to match your application needs.
47+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48+
minSdkVersion flutter.minSdkVersion
49+
targetSdkVersion flutter.targetSdkVersion
50+
versionCode flutterVersionCode.toInteger()
51+
versionName flutterVersionName
52+
}
53+
54+
buildTypes {
55+
release {
56+
// TODO: Add your own signing config for the release build.
57+
// Signing with the debug keys for now, so `flutter run --release` works.
58+
signingConfig signingConfigs.debug
59+
}
60+
}
61+
}
62+
63+
flutter {
64+
source '../..'
65+
}

0 commit comments

Comments
 (0)