Skip to content

Project Part 2: CRC Cards

logan11111 edited this page Feb 11, 2023 · 48 revisions

Player

Responsibilities Collaborators
Keeps a unique username of the Player QRCode
Keeps a score of the Player
Keeps a Player's avatar as an image
Keeps total QR codes scanned by the Player
Keeps list of QRCodes a user has scanned

PlayerActivity

Responsibilities Collaborators
Displays a list of QR codes a user has scanned (name and photo of location if applicable) Player
Allow users to select a QR code and go to QRCodeActivity QRCode
Displays the player's highest and lowest scores (through queries from PlayerController) PlayerController
Displays the player's username and their avatar
Displays buttons that allow the user to navigate to other pages

PlayerDB

Responsibilities Collaborators
Creates a new Player with a username, score (initially 0), avatar, number of QRCodes scanned (initially 0), and a list of QRCodes scanned (initially empty) in the Firebase Firestore database PlayerController
Reads the values of a Player in the Firebase Firestore database PlayerDBConnector
Updates the values of a Player in the Firebase Firestore database Player
Deletes a Player from the Firebase Firestore database

PlayerDBConnector

Responsibilities Collaborators
Connects to the Firebase Firestore database PlayerDB

PlayerController

Responsibilities Collaborators
Keeps a list of players PlayerDB
Add a player to the list of players and updates PlayerDB to reflect the changes PlayerActivity
Updates PlayerDB by editing a Player Player
Delete a player from the list of players and updates PlayerDB to reflect the changes
Provides LeaderboardActivity with a list of all players queried from PlayerDB
Sorts the list of players by total score

QRCode

Responsibilities Collaborators

QRCodeEditActivity

Responsibilities Collaborators

QRCodeActivity

Responsibilities Collaborators

QRCodeDB

Responsibilities Collaborators

QRCodeDBConnector

Responsibilities Collaborators

QRCodeController

Responsibilities Collaborators

Geolocation

Responsibilities Collaborators

GeolocationActivity

Responsibilities Collaborators

LeaderboardActivity

Responsibilities Collaborators
Display list of all users based off total score Player
Search bar at top to search by username for other users
Display drop down menu of users below search bar after entry of username
each user displayed is clickable

MainActivity

Responsibilities Collaborators

Map

Responsibilities Collaborators
Displays a map showing QRCodes near the player's current location Geolocation
Displays markers at QRCode geolocations

Comment

Responsibilities Collaborators
Keeps the author of the comment (a player) Player
Keeps the text of the comment
Keeps the date of the comment

Clone this wiki locally