commit | f232ae21d82c589950b1b53faf8c9f76a77e51dc | [log] [tgz] |
---|---|---|
author | Emily Shack <emshack@google.com> | Wed Dec 09 12:06:08 2015 -0800 |
committer | Emily Shack <emshack@google.com> | Wed Dec 09 12:06:08 2015 -0800 |
tree | 3e0feaaf4fd7eddc174c8a4fb269607f79d039fd | |
parent | 480acc7628df59395e96d741d512c84b7f773d60 [diff] |
Added ability to leave game when arranging. Added player name and icon in discovery screen. Now removing join game buttons of games no longer advertised Change-Id: I07f361462df1dd21525ec48499092b9e11e50898
Croupier is a Vanadium demo app of a general card playing game for multiple devices. Croupier utilizes Syncbase and P2P Discovery as the foundations for game formation and state synchronization.
This repository contains two implementations of Croupier, one in Go and the other in Mojo and Flutter. As Croupier's primary card game is Hearts, the two sides are meant to interoperate with that game. The Flutter version also supports Solitaire and is built so that more games can be added in the future.
Instructions for running the program with Flutter on Android follow. TODO(alexfandrianto): Add instructions for running the Go version.
Currently, development is heavily tied to an existing installation of Mojo. Please ensure that your Mojo checkout is located at $MOJO_DIR and has built out/android_Debug. Instructions are available here.
Development now also depends on the alpha branch of the Flutter repo. It is possible that the pubspec.yaml
file will need to be modified to accomodate your installation of Flutter. Instructions are available here.
Flutter depends on a relatively new version of the Dart SDK. Therefore, please ensure that you have installed the following version or greater:
Dart VM version: 1.13.0-dev.3.1 (Thu Sep 17 10:54:54 2015) on "linux_x64"
If you are unsure what version you are on, use dart --version
.
To install Dart, visit their download page. You may need to manually download a specific version of Dart. If so, visit their archives for exact downloads.
A Vanadium installation is not required since Croupier pulls all of its Vanadium-related dependencies from pub.
There are two ways to get credentials. These are used to determine who can access your Syncbase instance. You do not need to follow both instructions.
One way to obtain them is through OAuth. When Syncbase is started on Android, it will ask you to select an account. You must have an account added on the Android device for this to work.
During tests, it may be more convenient to create test credentials locally and push them onto the phone. Note: running the following command will pop-up the standard principal seekblessings
tab in order to obtain your approval to use OAuth.
make creds
If you clean the credentials, you will need to obtain fresh credentials.
If you have more than 1 device plugged into the computer, you will need to specify which device to use. adb devices
will tell you the order of your devices.
It is highly recommended that you mark/remember the order of the devices; it is the same as the order they were plugged into the computer/workstation.
For later devices, instead of ANDROID=1
use 2
, 3
, 4
, etc.
Note: Running Croupier on multiple Android devices simultaneously is still a work-in-progress. The workaround is to launch Croupier on a single device at a time.
Note: This example currently relies on a mount table on the local network at 192.168.86.254:8101
. This may be changed to the global mount table at a later time. https://github.com/vanadium/issues/issues/782
Start Croupier on your USB-debugging enabled Android device.
ANDROID=1 make start
Alternatively, use a different integer. Since the first device creates a syncbase instance that the others are mounted upon, it is recommended that this one is started before the other devices.
On your Android device, go to the Apps that you downloaded and Uninstall Mojo Shell from there. This cleanup step is important for when Mojo is in a bad state.
Note: Syncgroup data and some Syncbase data is not cleaned up between runs. This means that deleting Mojo Shell can often be helpful in cases where clearing Mojo Shell's data is insufficient.
Due to some issues with mojo_shell, you may occasionally fail to start the program due to a used port. Follow the error's instructions and try again.
Between builds of Mojo and Syncbase, you may wish to clean up the app and database info.
ANDROID=1 make clean
You can also clean credentials instead:
ANDROID=1 make clean-creds
Don't forget to do make creds
to rebuild them.
Lastly, you can also clear out the pub packages:
make veryclean