NTNU Course TDT4240 Software Architecture project repository for group 26.
The task is to create a Android Game, with focus on good architecture.
The target platform is Android, with API levels from 19 (Android 4.4 | KITKAT) to 28 (Android 9.0 | Pie).
Clone the repository or open project from git in Android studio.
git clone https://github.com/battleofthebases/game.git
Open the "game" folder as a project in Android Studio.
cd codestyle
./install.sh
- Restart Android Studio
- Select the code style scheme "grandcentrix" via Preferences --> Editor --> Code Style
With 3 simple steps you can reorder and reformat your code automatically with ⌘ + S. That shortcut you are used to press constantly although you know Android Studio automatically saves all files for you . Give ⌘ + S a different meaning:
Make sure a Java source file has focus (or you can’t record all steps)
- Select Edit > Macros > Start Macro Recording
- Select Code > Optimize Imports
- Select Code > Reformat Code
- Select Code > Rearrange Code
- Select File > Save All
- Select Edit > Macros > Stop Macro Recording and give it a name (mine is OptimizeImportsReformatRearrangeSave) Go to Preferences > Keymap
- Find the Macro section
- Add ⌘ + S shortcut for the new macro
To run tests
./gradlew jacocoTestReport
To create test coverage report
./gradlew build jacocoTestReport
Press "Play" and follow the in-game instructions.
To run the game you need an Android device running minimum API level: 19 Android 4.4(KITKAT)
Download the game to your Android device from the following url
- Clone the repository
foo@bar:~$ git clone https://github.com/battleofthebases/game.git- Download and install the latest version of Android Studio
- Open the project files through the setup wizard or by using the navigation bar in Android Studio
- Press Ctrl + R on Mac or Shift + F10 on Windows/Linux to run the application
- Choose your connected device if you have one connected through the USB interface. You can also use a virtual device.
- Press OK to build and run the game on the chosen device