https://github.com/extrawest/triple_seven_slots_game
Triple Seven Slots Game in Flutter
https://github.com/extrawest/triple_seven_slots_game
dart demo firebase firebase-hosting flutter flutter-testing flutter-web game gherkin slot-machine spa spin-wheel web
Last synced: 10 days ago
JSON representation
Triple Seven Slots Game in Flutter
- Host: GitHub
- URL: https://github.com/extrawest/triple_seven_slots_game
- Owner: extrawest
- Created: 2023-02-06T09:00:10.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-15T11:58:04.000Z (about 2 years ago)
- Last Synced: 2025-03-30T17:46:38.560Z (25 days ago)
- Topics: dart, demo, firebase, firebase-hosting, flutter, flutter-testing, flutter-web, game, gherkin, slot-machine, spa, spin-wheel, web
- Language: Dart
- Homepage: https://triple-seven-slots.web.app/
- Size: 1.16 MB
- Stars: 33
- Watchers: 1
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Triple seven slots game
[]()
[](mailto:[email protected])
[]()


## PROJECT INFO
- **Triple seven slots game based on the latest version of Flutter**
- **Game is properly working on Android, iOS and WEB**## Features
- Slot machine ([roll_slot_machine](https://github.com/extrawest/roll_slot_machine) package)
- Ability to make bet, user balance is locally stored
- Spin wheel each 8 hours
- Different lotties for prizes and balance increasing## Demo
[Triple Seven Slots Game](https://triple-seven-slots.web.app)
https://user-images.githubusercontent.com/117409513/216936860-b72e2d04-4780-4d4c-bd6f-257d86f44a13.mp4
### Installing:
**1. Clone this repo to your folder:**
```
git clone https://github.com/extrawest/triple_seven_slots_game.git
```**2. Change current directory to the cloned folder:**
```
cd triple_seven_slots_game
```**3. Get packages**
```
flutter pub get
```## Testing
### Unit tests
To run unit test run the following command in the terminal
```shell
flutter test test/unit_test/
```### Widget test
To run widget test run the following command in the terminal```shell
flutter test test/widget_test/ --dart-define IS_TESTING=true
```
If you are testing slot machine and want to specify prize, run:```shell
flutter test test/widget_test/ --dart-define IS_TESTING=true --dart-define MOCK_SLOT_MACHINE_PRIZE_INDEX=
```### Integration test
In order to run integration test you have to run the following command:```shell
flutter test integration_test/app_test.dart --dart-define IS_TESTING=true --dart-define MOCK_SLOT_MACHINE_VALUES=
```### BDD testing
To create new BDD tests, follow next steps**1. Create new .feature file(only if you want to test new features, otherwise, open .feature file of existing feature)**
**2. Add all scenarios you need**
**3. Save file and run:**
```
flutter packages pub run build_runner build watch --delete-conflicting-outputs
```**4. Review the generated code, and modify files, if there is some errors(don't modify main test file of the feature, update only steps files)**
## Setup code coverage preview
macOS or Linux:
All you have to do is to run these three commands
```shell
# Generate `coverage/lcov.info` file
flutter test --coverage
# Generate HTML report
# Note: on macOS you need to have lcov installed on your system (`brew install lcov`) to use this:
genhtml coverage/lcov.info -o coverage/html
# Open the report
# MacOS
open coverage/html/index.html
# Linux
xdg-open coverage/html/index.html
```>The generated HTML report will create a lot of files. To avoid checking them in to git, add `coverage`/ to your `.gitignore` file.
Windows:
Now create a file called `genhtml.perl` inside your flutter project root directory. (Make sure to .gitignore it) Then in the file, copy and paste the content this: https://raw.githubusercontent.com/linux-test-project/lcov/master/bin/genhtmlFinally open git bash and run `$ ./genhtml.perl ./coverage/lcov.info -o coverage/html`
Check You are done html files at `coverage/html`.
On android studio, select index.html then CTRL+SHIFT+C to copy the file path.
Open Chrome and on the url bar add `file:///+CTRL+V`. Tap enter. You are done.
## Firebase hosting
1. In order to add new build to Firebase hosting, follow these commands
```shell
firebase login
```
```shell
firebase init
```
2. Choose account, then choose Hosting as an option
3. Select Firebase project
4. Run:
```shell
flutter build web
```
```shell
firebase deploy
```Created by Roman Ovsepian
[Extrawest.com](https://www.extrawest.com), 2023
---