Skip to content
No description, website, or topics provided.
Branch: Iteration-3
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Branches to look for: Iteration-3

HackMaster is a turn based 2-player card game in which you play cards which expend resources. In return the cards can be used for either upgrading, defending, or attacking. The cards cost resources, and resources are incremented by resource rate each time it's the players turn (every second time).

Major packages:

The main code of the project is currently split between five packages: Application, Business, Objects, Persistence, and Presentation. These packages are in the directory hackmaster/app/src/main/java/hackmaster.

The application package contains the files:
• - It is used to instantiates the application database.
• - Manages the name and path of the database.
• - Starts and stops the database and controls which database is connected.

The business package contains the files:
• - Gets cards from the database and deals cards when necessary.
• - Tracks the game as it progresses. Can check if a player can play a card and if a player has lost all of their health.
• - Subclass of Game. Manages the turn and resources of a multiplayer game.
• - Applies cards played to the players.
• - Initializes the game and deck.
• - Subclass of Game. Manages the turn and resources of a single player game.

The Objects package contains the files:
• - A card in the game. Costs resources, gives something in return
• (extends PlayerClass) - The enemy AI in single player
• - A player in the game. Has resources and cards
• - Holds the players stats (overall app-user stats) does not currently track anything
• - The resources that a player or a card has (also holds player health)

The Persistence package contains the files:
• - Implements CardDataAccessInterface. Uses SQL statements to query the card database.
• - Extends DBComponentInterface. Interface for card database.
• - Interface for database access. Gets statements passes from DataAccessObject.
• - Interface for database initialization.
• Implements DBInterface. Initializes and opens the database. Creates statements for database access.
• - Implements PlayerDataAccessInterface. Uses SQL statements to query the player stats database.
• - Extends DBComponentInterface. Interface for player stats database.

The Presentation package contains the files:
• - Tracks player input.
• - Selects the music to be played.
• - Controls and updates the screen.
• - Loading screen for the app.

The project also contains test packages that mirrors the packages listed above. The test packages are located in hackmaster/app/src/test/java/HackMasterTest/

Log File

The log file (log.txt) is located in the root directory of the repo.

The button Layout/Hierarchy

Main Menu:
Single Player - Launches a single player game versus the AI
Multiplayer - Launches a multiplayer game where you take turns back and forth
Stats - Brings you to the stats page
Android back button - brings you to main menu

In game:
Discard Button - Discard the next card touched instead of playing it
Android Back button - prompts you if you want to leave the game
Pause - shows you the pause screen and pauses the game
Exit game - all prompt you if you want to exit the game
Resume game - Android back button - brings you back in game
Stats - brings you to the player stats page
Back - brings you back to pause menu
Android back button - brings you back in game

Andriod studio

Build once, if build doesn't work go to build->clean build. Then hit play.
If you can't run the simulator got on tools->android->sync gradle.

New Features/Changes

Improved UI
•More stylized card images
•Added stylized buttons
•Added background images

Streamlined Rendering
•Screen rendering has been improved and revamped

Refactored Code Base
•Code base has been refactored for improved interactivity between classes


March 27, 2018: The rendering may hang when playing a card in single player. Pressing discard renders the correct cards.

Credit to Music

"Java" Song :

"Dual_Core" Song:

"Hacker" Song:

"Welcome To Our World" Song:

"Pirate Music" Song:

You can’t perform that action at this time.