Magdalena Czapiewska · Jakub Kłos · Jakub Kołaczyński · Wojciech Rzepliński
You can build project from command line using:
./gradlew build
To create apk use:
./gradlew assemble
For more info check Android Studio website:
You can run tests from command line using:
./gradlew test
Or you can do it manually by clicking in Android Studio by doing right-click on a directory or file with test and click Run
For connected tests (run on android emulator) you can use:
./gradlew connectedAndroidTest
You can run code inspections from command line using:
./gradlew lint
Or you can do it manually by clicking in Android Studio: Code > Inspect Code.
For more information check lint guidelines.
Interaction between UI and game engine is done using 2 methods:
GameState Game.click(int row, int column);
void Game.setClickMode(ClickMode clickMode);
Game.click(int row, int column)
returns GameState
object that contains information about state of the game (PLAYING
, WON
, LOST
) and collection of fields and values to which those fields have to change after a click was registered.
Game.setClickMode(ClickMode clickMode)
doesn't return anything as it's assumed it has been succesfull.