Skip to content

EricYoung37/MinesweeperDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Minesweeper Demo

This repository contains demonstrations of my Android Minesweeper Project.

Author: Eric Young
Project Contributors: Eric Young, Yuqi You, Jiashu Zhang

Overview

This is an Android App that resembles the classic Windows puzzle video game Minesweeper.

Use Cases (applicable to both portrait and landscape views):

Screenshots displayed here are mostly for easy-mode games. You may check the screenshots directory for more hard-mode game screenshots. You may also check the demo video for checkpoint 5 (all other contents in this repository are for checkpoint 6 / the final checkpoint).

  1. The user starts a new game from the main menu. Main Menu
  2. The user views the time elapsing in the upper right corner.
  3. The user clicks a cell to open it. Clear Mode, Easy Game
  4. The user clicks the flag tool icon in the upper left corner to enter flag mode. Flag Mode, Easy Game
  5. In flag mode, the user clicks a cell to place a flag on it, and clicks the same cell again to reclaim the flag. (The number of flags available is shown below the flag tool icon and will change as the user places or reclaims flags.) Reclaim Flag, Easy Game
  6. The user submits his/her record to the leaderboard if he/she successfully finishes the game. (Depending on the difficulty of the game the user completes, the record will be submitted to the “easy game” database table or the “hard game” database table. Also, if the submitted player name already exists in the table, the record will be updated; otherwise, a new record is created.) Victory, Easy Game Before Submitting a Record, Easy Game Submitted a Record, Easy Game
  7. The user restarts the game by clicking the restart button at the bottom of the screen in the game page.
  8. The user goes to the leaderboard page from the homepage. Leaderboard, Easy Game
  9. The user switches between the “easy” leaderboard and the “hard” leaderboard with the navigation buttons at the bottom of the leaderboard page. Leaderboard, Hard Game
  10. The user deletes a record on the leaderboard page. Delete_Record, Easy Game
  11. The user checks the settings page. Settings
  12. The user checks the difficulty configuration page. Difficulty Config
  13. The user changes the game difficulty to easy. Change Difficulty to Easy
  14. The user changes the game difficulty to hard. Change Difficulty to Hard
  15. The user checks the theme configuration page. Theme Config
  16. The user set the theme to the default. Set Theme to Default
  17. The user set the theme to dark mode. Set_Theme_to_Dark

Non-functional requirements:

  1. Data States Preservation between Configuration Changes
    With ViewModel, data states for game field (e.g., cells opened, cells marked), flag status, and timer are all maintained in screen rotation. Easy Game before Rot Easy Game aft Rot Hard Game before Rot Hard Game aft Rot Easy Board before Rot Easy Board aft Rot Hard Board before Rot Hard Board aft Rot
  2. Design and display enhancement
    2 themes are now available: the default and the dark themes. The dark theme is newly added to accommodate app use in dark environments so that the screen light will not hurt the user’s eyes. Main Menu, Dark Easy Game, Dark Hard Game, Dark Easy Leaderboard, Dark Hard Leaderboard, Dark
  3. Resilience against Network Failures
    Firebase local caching is enabled to ensure the app functions under network failures.

Highlights:

  • Model-View-ViewModel (MVVM) architecture implemented to separate interface control and business logic.
  • Online leaderboard backed by NoSQL (Firebase Realtime Database) and local caching to ensure resilience against network failures.
  • Data dispatch process in the leaderboard ViewModel to better synchronize the background thread that runs the leaderboard RecyclerView adapter with the main (UI) thread.