CSCI 448 - Mobile Application Development (Android)Spring 2019 - Assignment 2 - Global Thermonuclear WarQuick Links: Canvas | CS @ Mines | Mines | Piazza |
|||||||||||||||||||||
| Home | Syllabus | Assignments | Schedule | Resources | | |||||||||||||||||||||
This assignment is due
by March 08, 2019 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 three activities each containing a single fragment:
The App should keep track of how many games have been won/lost/drawn and display this information to the user. As the user navigates between activities, 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 Extras, Arguments, and Results 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. The only winning move is not to play. Part I - Fragment One: The Welcome Screen
The layout for the Welcome Screen is very simple. Present the user
with three buttons:
Pressing the Options button will start the Options Activity and present the user with ways to change the game play. Pressing the Quit button will close the App in a graceful manner (no errors, message boxes, etc.). A very very simple example is shown below: Part II - Fragment Two: The Options Screen
The layout for the Options Screen is up to you. Present the user with
options that make sense for your game. For Tic-Tac-Toe, you would
allow the user to choose:
You may add as many options as you like (colors, computer difficulty, special messages, X & O piece choices, etc.). Have fun with it! Part III - Fragment Three: 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. On this
screen, display to the user the score (how many times X won, O won,
game was a draw). Let the user(s) then play the game.
When the game is over, display a message/Toast to the user with the outcome. Update the score and display the new score. 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). Use the image below as motivation (but vary to make it much cooler looking): Part IV - 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 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 V - Website!Update the webpage that you submitted
with Assignment1 to include an entry for this assignment. As usual,
include a screenshot (or two) and a brief description of the program,
intended to showcase what your program does to people who are not
familiar with the assignment.
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), README.txt, and
www/ folder. Name the zip file, userName_A2.zip. Upload this file to
Canvas under A2.
This assignment is due
by March 08, 2019 by 11:59pm.
| |||||||||||||||||||||
Last Updated: 03/03/19 23:07
|