CSCI 448 - Mobile Application Development (Android)Spring 2020 - Assignment 2 - Global Thermonuclear WarQuick Links: Canvas | CS @ Mines | Mines | Piazza |
|||||||||||||||||||||||||||||||
| Home | Syllabus | Assignments | Schedule | Resources | | |||||||||||||||||||||||||||||||
This assignment is due
by April 02, 2020 by 11:59pm.
Shall we play a game?
For this assignment, you will implement a simple game such as
Tic-Tac-Toe. Gameplay is not the focus of this assignment, but you must
follow the technical requirements listed below.
The App will be comprised of four screens:
The App will need keep track of how many games have been won/lost/drawn and display this information to the user. These details will be stored in a database. As the user navigates between screens, the score should not reset (unless the user goes through the options, see below). Speaking of options, however the user chooses to play the game, options need to be tracked and applied to every game that is played. This is where the arguments and preferences will come into use. When you create this project, set the package to include <userName_A2> and name the app <userName>_A2 where userName is your name.
An example of the completed app is shown below:
The only winning move is not to play. Part I - Fragment One: The Welcome Screen
The layout for the Welcome Screen is very simple. Display a splash screen
to serve as an intro to the game. This could be as simple as text or as
complex as an image.
The menu options for this screen are:
Part II - Fragment Two: The Preferences Screen
The layout for the Preferences Screen will be dictated by the SharedPreferences and the
corresponding Preferences XML. Present the user with
options that make sense for your game. For Tic-Tac-Toe, you could
allow the user to choose:
You may add as many options as you like (colors, themes, dark mode, special messages, X & O piece choices, etc.). Have fun with it! The menu options for this screen are:
Part III - Fragment Three: The History Screen
You will need to keep a record of all games played in a database. The exact information
stored will depend on the game you choose. One of the fields must be a Timestamp
of when the game completed. For Tic-Tac-Toe, this could include:
The menu options for this screen are:
Part IV - Fragment Four: The Game Screen
This is where the magic happens. You can decide
what the layout for this screen should be. This is where the actual game
play will take place. Let the user(s) play the game.
When the game is over, display a Toast to the user with the outcome. Update the database with the game result. Finally, present the user with two buttons to either:
With the example of Tic-Tac-Toe, the game will need some sort of 3x3 interface for the user to select where to play. Do not use simple text output for the pieces (literally "X" and "O") but instead use ImageButtons or ImageViews to spice up your game with exciting Drawables. Maybe instead of X vs O, it's the Rebels vs the Empire. You will need to use the API to find out what functions/attributes are available to you. Piazza is your friend as well. If it is set for two players, then play alternates between X and O. If gameplay is set to one player, then after the user places an X, the computer should play. The computer can be VERY SIMPLE. Have the computer select a random free space to play. No need for complex AI that never loses (though you can add it if you like - here are some strategy tips). The menu options for this screen are:
Part V - Landscape ModeFinally, create an appropriate
landscape layout for when the screen is rotated (the game and options
should all be accessible from either orientation). More importantly,
you will need to save the state for every Activity/Fragment when the screen is
rotated. The user should have a seamless experience. This means: (1)
options do not get reset (2) the score does not get reset (3) the game
does not get reset. From the user's perspective, nothing should change
and there's no way to cheat at the game.
Part XC - Extra Credit
There are three extensions you can do for extra credit:
Part VI - Exit Interview
Be sure to include a
README.txt
file containing any comments, notes to run, etc. In addition, answer
the following questions in yourREADME.txt :
Documentation
With this and all future assignments, you are expeced to appropriately
document your code. This includes writing comments in your source code
- remember that your comments should explain what a piece of code is
supposed to do and why; don't just re-write what the code says in
plain English. Comments serve the dual purpose of explaining your code
to someone unfamiliar with it and assisting in debugging. If you know
what a piece of code is supposed to be doing, you can figure out where
it's going awry more easily.
Proper documentation also means including a README.txt
file with your submission. In your submission folder, always include a
file called
README.txt
that lists:
Grading Rubric
Your submission will be graded according to the following rubric.
SubmissionPlease make sure your project
produces an app with the name userName_A2. When you are
completed with the assignment, zip together your Android Studio
project (which includes the Kotlin and XML source code) and README.txt. Name the zip file, userName_A2.zip. Upload this file to
Canvas under A2.
This assignment is due
by April 02, 2020 by 11:59pm.
| |||||||||||||||||||||||||||||||
Last Updated: 03/27/20 14:21
|