AndroidReq Game
-
Upload
subhashree -
Category
Documents
-
view
225 -
download
0
Transcript of AndroidReq Game
-
7/26/2019 AndroidReq Game
1/40
Android Game Suite
CS 430
Requirements Specification
February 14th, 2010
Benjamin Carpenter
Ryan Daugherty
Jack Dehlin
Jay Greene
1
-
7/26/2019 AndroidReq Game
2/40
ab!e of Contents
1.0 Introduction..................................................................................................................8
1.1 Goals and objectives................................................................................................8
1.2 Statement of scope...................................................................................................8
1.3 Software context.......................................................................................................81.4 Major constraints.....................................................................................................8
2.0 sa!e scenario..............................................................................................................8
2.1 ser profiles..............................................................................................................8
2.2 se"cases...................................................................................................................8
3.0 #ord Searc$.................................................................................................................9
3.1 %ata %escription......................................................................................................9
3.1.1 %ata objects.....................................................................................................10
3.1.2 &elations$ips...................................................................................................10
3.1.3 'omplete data model......................................................................................10
3.1.4 %ata dictionar(................................................................................................10
3.2 )unctional Model and %escription.......................................................................103.2.1 %escription for )unctions...............................................................................10
3.2.1.1 Startup......................................................................................................10
3.2.1.2 *ew Game.................................................................................................11
3.2.1.2.1 'reate &andom +u,,le.....................................................................11
3.2.1.3 Main Game )unction...............................................................................11
3.2.1.3.1 %raw t$e -oard.................................................................................11
3.2.1.3.2 Select etters.....................................................................................11
3.2.1.4 Menu )unctions........................................................................................11
3.2.1.4.1 Submit a #ord..................................................................................11
3.2.1.4.1.1 %ictionar( '$ec/.......................................................................12
3.2.1.4.2 'lear t$e -oard.................................................................................123.2.1.4.3 elp....................................................................................................12
3.2.1.4.4 iew Submitted #ords.....................................................................12
3.2.1.4. )inis$ Game......................................................................................12
3.2.1.4..1 'alculate Score...........................................................................12
3.2.1. i!$ Score............................................................................................12
3.2.1. xit Game.............................................................................................12
3.2.2 Software Interface %escription......................................................................12
3.2.2.1 xternal mac$ine interfaces...................................................................12
3.2.2.2 xternal s(stem interfaces......................................................................13
3.2.2.3 uman interface......................................................................................13
3.2.3 'ontrol flow description.................................................................................13
3.3 -e$avioral Model and %escription.......................................................................13
3.3.1 %escription for software be$avior.................................................................13
3.3.1.1 vents........................................................................................................13
3.3.1.1.1 *ew Game -utton +ressed...............................................................13
3.3.1.1.2 etter Selected...................................................................................13
3.3.1.1.3 Menu -utton +ressed........................................................................13
3.3.1.1.4 Submit -utton +ressed.....................................................................13
2
-
7/26/2019 AndroidReq Game
3/40
-
7/26/2019 AndroidReq Game
4/40
-
7/26/2019 AndroidReq Game
5/40
.1 %ata %escription....................................................................................................23
.1.1 %ata objects.....................................................................................................23
.1.2 &elations$ips...................................................................................................24
.1.3 'omplete data model......................................................................................24
.1.4 %ata dictionar(................................................................................................24
.2 )unctional Model and %escription.......................................................................25.2.1 %escription for )unctions...............................................................................25
.2.1.1 Start p.....................................................................................................25
.2.1.2 *ew Game.................................................................................................25
.2.1.2.1 9nswer Generator.............................................................................25
.2.1.3 Main Game )unction...............................................................................25
.2.1.3.1 Submit Guess )unction....................................................................25
.2.1.3.2 Split )unctional.................................................................................25
.2.1.3.3 'ompare )unction............................................................................26
.2.1.3.4 Set 'olor )unction............................................................................26
.2.1.4 Menu )unctions.......................................................................................26
.2.1.4.1 elp....................................................................................................26.2.1.4.2 *ew Game..........................................................................................26
.2.1.4.3 iew i!$ Score................................................................................26
.2.1.4.4 )inis$ Game......................................................................................27
.2.1.4.4.1 'alculate Score...........................................................................27
.2.1.4.4.2 i!$ Score..................................................................................27
3.2.1. xit Game.................................................................................................27
.2.2 Software Interface %escription......................................................................27
.2.2.1 xternal mac$ine interfaces...................................................................27
.2.2.2 xternal s(stem interfaces......................................................................27
.2.2.3 uman interface......................................................................................27
.2.3 'ontrol flow description.................................................................................28
.3 -e$avioral Model and %escription.......................................................................28
.3.1 %escription for software be$avior.................................................................28
.3.1.1 vents........................................................................................................28
.3.1.1.1 *ew Game -utton +resses...............................................................28
.3.1.1.2 Menu -utton +ressed........................................................................28
.3.1.1.3 ;> -utton +ressed...........................................................................28
.3.1.1.4 Guess is Invalid.................................................................................28
.3.1.1. '$aracter *ot )ound........................................................................28
.3.1.1. '$aracter )ound in 'orrect +osition.............................................28
.3.1.1.5 '$aracter )ound in Incorrect +osition...........................................28
.3.1.1.6 iew i!$ Score -utton +ressed.....................................................28
.3.1.1.7 elp -utton +ressed.........................................................................28
.3.1.1.10 *ew Game -utton +ressed.............................................................29
.3.1.1.11 )inis$ Game -utton +ressed..........................................................29
.3.1.1.12 *o i!$ Score )ound.....................................................................29
.3.1.1.13 i!$ Score )ound...........................................................................29
.3.1.2 States.........................................................................................................29
.3.1.2.1 Main Menu........................................................................................29
5
-
7/26/2019 AndroidReq Game
6/40
-
7/26/2019 AndroidReq Game
7/40
5.3.1.1. Settin! -utton +ressed......................................................................35
5.3.1.1. ints ;ption -utton +ressed...........................................................35
5.3.1.1.5 Music ;ption -utton +ressed..........................................................35
5.3.1.1.6 %ifficult( Selected.............................................................................35
5.3.1.1.7 8ile Selected.......................................................................................35
5.3.1.1.10 %raw -oard.....................................................................................355.3.1.2 States.........................................................................................................35
5.3.1.2.1 Main Menu........................................................................................35
5.3.1.2.2 9bout..................................................................................................35
5.3.1.2.3 xit.....................................................................................................35
5.3.1.2.4 Menu..................................................................................................36
5.3.1.2. Settin!s...............................................................................................36
5.3.1.2. ints...................................................................................................36
5.3.1.2.5 Music..................................................................................................36
5.3.1.2.6 %ifficult( Selected.............................................................................36
5.3.1.2.7 8ile Select...........................................................................................36
5.3.1.2.10 *umber Select.................................................................................365.3.2 State 8ransition %ia!rams.............................................................................36
6.0 &estrictions? imitations? and 'onstraints..............................................................37
7.0 alidation 'riteria.....................................................................................................37
7.1 'lasses of tests........................................................................................................37
7.1.1 #elcome Screen..............................................................................................37
7.1.2 #ord Searc$....................................................................................................38
7.1.3 'onnect )our...................................................................................................38
7.1.4 -attles$ip.........................................................................................................38
7.1. an!man.........................................................................................................38
7.1. Sudo/u.............................................................................................................38
7.2 xpected software response..................................................................................38
7.2.1 #elcome Screen..............................................................................................38
7.2.2 #ord Searc$....................................................................................................38
7.2.3 'onnect )our...................................................................................................38
7.2.4 -attles$ip.........................................................................................................39
7.2. an!man.........................................................................................................39
7.2. Sudo/u.............................................................................................................39
7.3 +erformance bounds..............................................................................................39
10.0 9ppendices................................................................................................................39
10.1 +roduct Strate!ies................................................................................................39
10.2 Supplementar( information................................................................................39
7
-
7/26/2019 AndroidReq Game
8/40
1.0 Introduction
This document specifies the requirements for the production and desin of the !ame
"uite soft#are for the !oo$e %ndroid operatin s&stem. The product #i$$ 'e a suite offi(e simp$e and eas& ames for a user to p$a&. The ames inc$ude a #ord search) connect
four) 'att$e ship) hanman) and a "udo*u. The first four ames #i$$ 'e unique$&
de(e$oped and the fifth #i$$ use an open source "udo*u. The user interface #i$$ 'e eas& touse and a$$o# the user to o in+'et#een ames #ith ease. ,t #i$$ use the ce$$ phone
operatin s&stem %ndroid) #hich is on a $ot of ce$$ phones toda&. The android operatin
s&stem uses a mar*et p$ace to se$$ app$ications for the phone.
1.1 Goals and objectives
The oa$ of this pro-ect is to produce an interacti(e and entertainin app$ication
for the %ndroid mar*etp$ace. This app #i$$ 'e a suite of se(era$ sma$$er ames)one of #hich is open source) the rest custom made. The& #i$$ 'e p$a&a'$e on an&
phone supportin the android operatin s&stem #ith access to the internet.
1.2 Statement of scopeThe on$& input to this pro-ect is the users attention and strateic mo(es/ and the
on$& output is the entertainment that is a consequence of the input.
1.3 Software contextThe 'i picture of this pro-ect #i$$ 'e to pro(ide entertainment for an&one #ithaccess to an %ndroid de(ice.
1.4 Major constraints
"ince this pro-ect can easi$& 'e 'ro*en do#n into man& sma$$er functionin parts)there are fe# ma-or constraints. %s $on as the %ndroid ar*etp$ace is up and
runnin and peop$e are sti$$ usin the %ndroid ") it #i$$ 'e possi'$e to mar*et)
maintain) and operate this app$ication.
2.0 sa!e scenario
2.1 ser profilessers of the s&stem #i$$ 'e an&one #ho has a mo'i$e de(ice operatin the
%ndroid " #ith access to the %ndroid ar*etp$ace. The app$ication #i$$ 'e
accessi'$e to e(er&one '& these means and require on$& na(iation of the menus
and ames throuh the touch+screen interface.
2.2 se"cases
Fiures one and t#o sho# the different use cases for the ame suite. Fiure onesho# the interaction 'et#een the user and the %ndroid ". Fiure t#o sho# the
interaction 'et#een the user and the main menu.
8
-
7/26/2019 AndroidReq Game
9/40
)i!ure ;ne: se 'ase %ia!ram for interaction wit$ t$e user and t$e 9ndroid ;S
)i!ure 8wo: se 'ase %ia!ram for interaction wit$ t$e user and t$e main menu
3.0 #ord Searc$3.1 %ata %escriptionThe #ord search uti$ies a coup$e of different data o'-ects. These o'-ects are used
for passin data around and *eepin trac* of information. The data *eeps trac* of
se$ected $etters) se$ected #ords) and ame scores.
9
-
7/26/2019 AndroidReq Game
10/40
-
7/26/2019 AndroidReq Game
11/40
This function is initiated #hen the #ord search ame is pressed
from the home screen. The function starts a ne# acti(it& that
sho#s the main menu for the ame.
3.2.1.2 *ew Game
This function is initiated at the initia$ screen #hen the ne# ame'utton is pressed. %fter the 'utton is pressed) it creates a random
pu$e) dra#s the 'oard) then passes of the responsi'i$it& to the
main ame function.
3.2.1.2.1 'reate &andom +u,,le
hen a ne# ame is started) this function random$&
pic*s 81 num'ers. The rane of the num'ers is 0 to25 and is then con(erted to character to represent a
$etter. The $etters are then stored in an arra&.
3.2.1.3 Main Game )unction%fter a ne# ame is started) the main ame function runs
functions to #atch the user actions and act accordin$&.
3.2.1.3.1 %raw t$e -oard
(er& time an action or function is ca$$ed the 'oard isredra#n to sho# the chanes. The function dra#s a
99 'oard #ith the $etters inserted into each position.
The function $oo*s at an arra& to see #hich #ords
#ere a$read& correct$& se$ected. These #ords aredra#n a different co$or.
3.2.1.3.2 Select etters
This function is supported '& the android
onc$ic*$istener. hen a user se$ects a $etter) it records
it in an arra&. ,t *eeps trac* of the order that the userpresses the $etters in.
3.2.1.4 Menu )unctions
urin the ame the user can press the menu 'utton to 'rin upoptions. The menu option is used to conser(e space on the screen.
3.2.1.4.1 Submit a #ord
%fter $etters are se$ected the user can su'mit the #ord
to see if it is a correct #ord. The function ca$$s
dictionar& chec* and ets the resu$t. ,f it is a #ord)then the #ord is added to the su'mitted #ord data
o'-ect. ,f it is not a #ord) then the screen sha*es. %fter
the #ord functions are done) the se$ected is c$eared
#ith the c$ear function.
11
-
7/26/2019 AndroidReq Game
12/40
-
7/26/2019 AndroidReq Game
13/40
-
7/26/2019 AndroidReq Game
14/40
3.3.1.1. #ord is misspelled
"e$ected $etters are c$eared then the screen sha*es.
3.3.1.1.5 etters are in 'orrect +ositions
ord is appended to the su'mitted #ord data o'-ect
then the se$ected $etters are c$eared. etters can on$&'e p$a&ed if the& touch the net $etter in the (ertica$)
horionta$) or diaona$ direction.
3.3.1.1.6 etters are not in 'orrect +ositions
"e$ected $etters are c$eared then the screen sha*es.
3.3.1.1.7 elp -utton +ressed
The ru$es are sho#n in a dia$o 'o.
3.3.1.1.10 iew Submitted -utton +ressed
The correct$& su'mitted #ords are sho#n in a dia$o'o.
3.3.1.1.11 'lear Selected -utton +ressed
"e$ected $etters are c$eared from the screen.
3.3.1.1.12 )inis$ed -utton +ressed
!ame is returned to the ames home screen and the
score is ca$cu$ated and sho#n.
3.3.1.1.13 *o i!$ Score is found
% defau$t ero is disp$a&ed on the ames home
screen.
3.3.1.1.14 i!$ Score is found
The hihest score is disp$a&ed on the ames homescreen.
3.3.1.2 States
3.3.1.2.1 Main Menu
The main menu is disp$a&ed #ith the 'uttons for a ne#
ame and eit.
3.3.1.2.2 Select etter
The 'oard is disp$a&ed #here a user can se$ect one or
mu$tip$e $etters.
3.3.1.2.3 In Game Menu
14
-
7/26/2019 AndroidReq Game
15/40
-
7/26/2019 AndroidReq Game
16/40
-
7/26/2019 AndroidReq Game
17/40
The re$ationships 'et#een the data o'-ects a'o(e can 'e seen in the fiure
'e$o#. The user #i$$ su'mit data and the proram #i$$ pass around that
data.
4.1.3 %ata dictionar(
,f the ame is c$osed at the end of a round or 'efore an& p$a&er p$aces achip #hen a ne# ame is started then no data is stored other than the ta$$&
of #ins. ,f the ame is c$osed mid round then the state of the 'oard is
stored $oca$$& and reinitia$ied upon re+$aunchin the app$ication.
4.2 )unctional Model and %escription
4.2.1 %escription for )unctions
4.2.1.1 Startup
This function is initiated #hen the Connect Four ame is pressed
from the home screen. The function starts a ne# acti(it& that
sho#s the main menu for the ame.
4.2.1.2 *ew Game
This function is initiated at the initia$ screen #hen the ne# ame'utton is pressed. %fter the 'utton is pressed) it creates an empt&
'oard of se(en '& si) dra#s the 'oard) then passes off the
responsi'i$it& to the main ame function.
4.2.1.3 Main Game )unction
%fter a ne# ame is started) the main ame function runs
functions to #atch the user actions and act accordin$&.
4.2.1.3.1 +lacin! a '$ip
This function is supported '& the androidonc$ic*$istener. hen a p$a&er se$ects a co$umn to
p$ace their chip the $o#est empt& space in that
co$umn is chaned to their co$or.
4.2.1.3.2 '$ec/ for ictor(
ach time a chip is p$aced the ame #i$$ chec* if that
p$a&er has #on '& tr&in to find three ad-acent chips oftheir co$or in an& direction.
4.2.1.4 Menu )unctions
urin the ame the user can press the menu 'utton to 'rin up
options. The menu option is used to conser(e space on the screen.
4.2.1.4.1 *ew Game
This function c$ears the 'oard and 'eins a ne#
ame.
17
-
7/26/2019 AndroidReq Game
18/40
4.2.1.4.2 elp
This function disp$a&s the ru$es of the ame.
4.2.1.4.4 iew #ins
This function disp$a&s the tota$ num'er of #ins for
each co$or) '$ac* and red.
4.2.1.4. xit
This function ends the current ame and ta*es theuser to the main menu of the ame. ,f an& chips ha(e
'een p$aced on the 'oard the $ocations of those chips
is stored on the de(ise and re$oaded once the
app$ication is restarted.
4.2.2 Software Interface %escription
Connect Four uses one interface that the user can see. The one that the&
see is throuh the ce$$ phone. The ce$$ phone must 'e runnin the %ndroidoperatin s&stem.
4.2.2.1 xternal mac$ine interfaces
The ame #i$$ run on t#o different machines. ne is an emu$ator
of a ce$$ phone that is used for de(e$opment and testin. The otheris the users ce$$ phone that hosts the ame. The ame must 'e
compati'$e #ith the %ndroid operatin s&stem.
4.2.2.3 uman interfaceThis is the main interface that the user #i$$ interact #ith. The
interface #i$$ a$$o# the user to use the phones touch screen
ser(ices and ana$o 'uttons. This interface is c$ear and eas&to use. ,t sho#s 'uttons and tet so the user can understand
#hat is oin on.
4.2.3 'ontrol flow descriptionThe contro$ f$o# of the Connect Four ame starts #hen the user starts a
ne# ame. %fter the ne# ame is started there #i$$ 'e different states of
the ame. This continues ti$$ the ame is finished.
4.3 -e$avioral Model and %escription
4.3.1 %escription for software be$avior
4.3.1.1 vents
4.3.1.1.1 *ew Game -utton +ressed
% ne# ame is started) empt& 'oard is dra#n.
4.3.1.1.2 'olumn Selected
hen the user touches a 'o at the top of a co$umn
the $o#est empt& space in that co$umn is s#itched to
18
-
7/26/2019 AndroidReq Game
19/40
that users co$or. This is done unti$ another e(ent
happens.
4.3.1.1.3 Menu -utton +ressed
hen the phones menu 'utton is pressed a menu
pops up.
4.3.1.1.4 'olumn is full
The screen sha*es and the p$a&er is a$$o#ed to se$ectanother co$umn.
4.3.1.1. 9ll 'olumns are full
The ame ends and a ne# one 'eins #ith anempt& 'oard.
4.3.1.1. +la(er Gets )our in a &ow
The score ta$$& for the #innin co$or is increased and ane# ame 'eins.
4.3.1.1.5 elp -utton +ressed
The ru$es are sho#n in a dia$o 'o.
4.3.1.1.6 xit -utton +ressed
!ame is returned to the ames home screen and the
score is ca$cu$ated and sho#n.
4.3.1.1.7 iew #ins -utton is pressed
The tota$ num'er of #ins for each co$or is disp$a&ed.
4.3.1.2 States
4.3.1.2.1 Main Menu
The main menu is disp$a&ed #ith the 'uttons for a ne#ame and eit as #e$$ as the num'er of #ins.
4.3.1.2.2 Select 'olumn
The 'oard is disp$a&ed #here a user can se$ect aco$umn to p$ace their chip. The ame chec*s to see if
the ne#$& p$aced chip ma*es the p$a&er a #inner.
4.3.1.2.3 In Game Menu
% menu is disp$a&ed that i(es the option to start a
ne# ame) (ie# #ins) sho# he$p) end ame) or o'ac* to continue ame.
4.3.1.2. S$ow elp
% dia$o 'o #i$$ sho# the ru$es of the ame.
19
-
7/26/2019 AndroidReq Game
20/40
-
7/26/2019 AndroidReq Game
21/40
-
7/26/2019 AndroidReq Game
22/40
-
7/26/2019 AndroidReq Game
23/40
.3.1.2.2 +la(in! Game
The ser and Computer a$ternate performin mo(es
unti$ someone #ins or the ame is premature$& ended.
.3.2 State 8ransition %ia!rams
)i!ure seven: -attle S$ip State %ia!ram
.0 #ord Guesser.1 %ata %escriptionThe #ord uessers uti$ies a fe# different data o'-ects each of #hich are uses for
passes data around the proram and *eepin trac* of information. The data *eepstrac* of the correct ans#er to the #ord uess as #e$$ as each indi(idua$ character
#ithin the ans#er) each indi(idua$ #ord ? a$so trac*in each indi(idua$ character
#ithin each uess) as #e$$ as the num'er of indi(idua$ uesses.
.1.1 %ata objects
The first data o'-ect is the ne# ame. nce the #ord uess app$ication isse$ected from the home screen a ne# ame is initiated #ith an ans#er) a
uess count) a uess arra& and a ;oo$ean correctness fie$d. ach e$ement
of the uess arra& is a character arra& so that each $etter of each uess can'e compared to the correct ans#er. There #i$$ 'e a 'utton at the 'ottom of
the , #hich #i$$ a$$o# the user at an& point #ithin the runnin of the
proram to create a ne# ame) at #hich time the pre(ious ame #i$$ 'e
o(er#ritten.
23
-
7/26/2019 AndroidReq Game
24/40
The net data o'-ect is the ans#er. The ans#er #i$$ 'e enerated at the
'einnin of each ne# ame accessin a predefined $ist of si $etter #ords.
The ans#er #i$$ 'e stored in an arra& of characters.
The third data o'-ect is the uess arra&. The uess arra& #i$$ consist of si
e$ements each of #hich is a character arra&. ,t #i$$ 'e enerated from andit Tet fie$d su'mitted '& the user. ,f the uess is a (a$id #ord @,.e. has
si characters) and a$$ characters are $ettersA then the uess #i$$ 'e
con(erted to a character arra& and added to the uess arra&. ther#ise theuess #i$$ 'e inored) the user #i$$ 'e prompted of the mista*e and #i$$ 'e
a'$e to su'mit another uess.
The fina$ data o'-ect #i$$ 'e the fina$ score #hen the ame is ended. Thescore is ca$cu$ated '& countin the num'er of #ords correct$& ans#ered
'efore endin the ame) mu$tip$&in that num'er '& one thousand and
su'tractin the num'er of uesses ta*en mu$tip$ied '& 50. The ame #i$$
$oca$$& *eep the hihest score for disp$a&.
.1.2 &elations$ipsThe re$ationship 'et#een the data o'-ects a'o(e can 'e seen in the
fo$$o#in fiure. The user #i$$ su'mit data and the proram #i$$ process
that information accordin$&.
.1.3 'omplete data model
)i!ure ei!$t: #ord Guesser 'omplete %ata Model
.1.4 %ata dictionar(
24
-
7/26/2019 AndroidReq Game
25/40
-
7/26/2019 AndroidReq Game
26/40
-
7/26/2019 AndroidReq Game
27/40
.2.1.4.4 )inis$ Game
This function is (er& simi$ar to the >e# !ame function/ho#e(er) rather than ta*in the user 'ac* to the #ord uess
ame screen) the user is returned 'ac* to the ame suite
home screen as #e$$ as the fina$ score 'ein ca$cu$ated andsu'mitted to the s&stem. ,t ends the ne# ame acti(it&.
.2.1.4.4.1 'alculate Score
This function ca$cu$ates the fina$ score of the ame.
,t does this '& countin the tota$ num'er of correct
ans#ers #ithout endin the ame mu$tip$ied '&
1000 and su'tractin the tota$ num'er of uessesmu$tip$ied '& 50.
.2.1.4.4.2 i!$ Score
hen a ame is finished) either '& the userincorrect$& uessin si consecuti(e times or '&
se$ectin finish ame in the menu) the score isca$cu$ated and compared to the current hih score.
The hiher of the t#o scores is stored onto the phone
and disp$a&ed in the hih score option of the menu.
3.2.1. xit Game
This function eits the #ord uesser ame screen and returns 'ac*
to the ame suites main menu.
.2.2 Software Interface %escription
ord uesser uses on interface that the user can see. The one that the& cansee is throuh the ce$$ phone. The ce$$ phone must 'e runnin the %ndroid
".
.2.2.1 xternal mac$ine interfaces
The ame #i$$ run on t#o different machines. ne is an emu$ator
of a ce$$ phone runnin the %ndroid " #hich #i$$ 'e used for
de(e$opment and testin. The other is the users ce$$ phone thathosts the ame. The ame must 'e compati'$e #ith the %ndroid
".
.2.2.2 xternal s(stem interfacesThere are no eterna$ s&stem interfaces for the #ord uess ame.
.2.2.3 uman interfaceThis is the main interface that the user #i$$ interact #ith. The
interfaces #i$$ a$$o# the user to use the phones touch screen
ser(ices and ana$o 'uttons. This interface is c$ear and eas& to use.
27
-
7/26/2019 AndroidReq Game
28/40
,t sho#s 'uttons and tet so the user can understand #hat is oin
on #ithin the app$ication.
.2.3 'ontrol flow description
The contro$ f$o# of the #ord uesser starts #hen the user starts a ne#
ame. %fter the ne# ame is started there #i$$ 'e different states of theame. This continues ti$$ the ame is finished. These indi(idua$ ame
states are descri'ed in section 6.2.3.2 and its su'sections.
.3 -e$avioral Model and %escription
.3.1 %escription for software be$avior.3.1.1 vents
.3.1.1.1 *ew Game -utton +resses
% ne# ame is started) ans#er fetched from the dictionar&.
.3.1.1.2 Menu -utton +ressed
hen the phones menu 'utton is pressed a menu pops up.
.3.1.1.3 ;> -utton +ressed
hen the B 'utton is pressed the tet in the dit Tet
fie$d is retrie(ed and chec*ed for correctness. Then the
uess is compared aainst the ans#er.
.3.1.1.4 Guess is Invalid
dit Tet fie$d is c$ears and the user is prompted that the
pre(ious uess #as incorrect in s&nta.
.3.1.1. '$aracter *ot )ound
The specific character in uess is printed to the screen in thedefau$t re& tet and the uess count is incremented.
.3.1.1. '$aracter )ound in 'orrect +osition
The specific character in the uess is printed in : to
sinif& it is a correct $etter and in the correct position.
.3.1.1.5 '$aracter )ound in Incorrect +osition
The specific character in the uess is printed in =
to sinif& it is a correct $etter/ ho#e(er) in an incorrect
position.
.3.1.1.6 iew i!$ Score -utton +ressed
The hih score of the ame is disp$a&ed to user as #e$$ asthe score of the current ame @if an&A.
.3.1.1.7 elp -utton +ressed
The ru$es are disp$a&ed in a dia$o 'o.
28
-
7/26/2019 AndroidReq Game
29/40
.3.1.1.10 *ew Game -utton +ressed
The current ame #i$$ 'e destro&ed and a ne# ame #i$$ 'einitiated. The score of the current ame #i$$ not 'e
ca$cu$ated or compared to the hih score.
.3.1.1.11 )inis$ Game -utton +ressed
The score of the current ame is ca$cu$ated and disp$a&ed to
the user. ,t is then compared to the current hih score and ifreater) the user is prompted that the& -ust set a ne# hih
score. !ame is then returned to the ame suites home
screen.
.3.1.1.12 *o i!$ Score )ound
% defau$t ero is disp$a&ed #hen user se$ects ie# Dih
"core from the menu.
.3.1.1.13 i!$ Score )ound
The hihest score is sp$a&ed #hen the user se$ects ie#Dih "core from the menu.
.3.1.2 States
.3.1.2.1 Main Menu
The main menu is disp$a&ed #ith the 'uttons for a ne#
ame and eit.
.3.1.2.2 nter Guess
The dit Tet ie# is disp$a&ed #here a user can input a
#ord as a uess. The #ord must 'e si $etters in $enth.
.3.1.2.3 In Game Menu
% menu in disp$a&ed that i(es the option to (ie# the hihscores) start a ne# ame) finish the current ame) or sho#
he$p.
.3.1.2.4 Submit Guess
ord !uesser chec*s the uess for (a$idit& then compares
uess to the ans#er to determine #hich characters are
correct.
.3.1.2. *ew Game
% c$eared ame screen is disp$a&ed and a$$ ame data is setto defau$t.
.3.1.2. )inis$ Game
29
-
7/26/2019 AndroidReq Game
30/40
-
7/26/2019 AndroidReq Game
31/40
)i!ure nine: #ord Guesser State %ia!ram
5.0 Sudo/u
5.1 %ata %escriptionThe #ord search uti$ies a coup$e of different data o'-ects. These o'-ects are used
for passin data around and *eepin trac* of information. The data *eeps trac* ofnum'ers) difficu$t$& $e(e$) ti$es) and hints.
5.1.1 %ata objects
The first data o'-ect is the user. The user #i$$ se$ect a ti$e to enter a
num'er into. The user can se$ect an& of the ti$es in the 99 'oard. nce ati$e is se$ect a dia$o 'o #i$$ #ith the a(ai$a'$e num'ers. The user #i$$
se$ect a num'er and it #i$$ 'e p$aced into the ti$e.
The second data o'-ect is the hints. hen the ti$e se$ected dia$o 'o
appears on$& the a(ai$a'$e num'ers appear. This is he$ped out '& the hintfunction) #hich ca$cu$ated the used num'ers. The hint function a$so co$ors
ti$es accordin to ho# man& num'ers can o into the ti$e.
31
-
7/26/2019 AndroidReq Game
32/40
The $ast data o'-ect is the difficu$t& $e(e$. hen a ne# ame is started) the
user se$ects an eas&) medium) or hard $e(e$. Then a 'oard is dra#n '& thatdifficu$t&.
5.1.2 &elations$ipsThe re$ationships 'et#een the data o'-ects a'o(e can 'e seen in the fiure
'e$o#. The user #i$$ su'mit data and the proram #i$$ pass around that
data.
5.1.3 'omplete data model
)i!ure ten: Sudo/u 'omplete %ata Model
5.1.4 %ata dictionar(
%$$ the data is stores $oca$$& and erased #hen a ame is ended. hen aame is started the ame 'oard is $oaded and a$$ the data is stored in $oca$
(aria'$es. hen the ame is o(er or ended the $oca$ data is erased.
5.2 )unctional Model and %escription
5.2.1 %escription for )unctions
5.2.1.1 Startup
This function is initiated #hen the "udo*u 'utton ispressed from the home screen. The function starts a ne#
acti(it& that sho#s the main menu for the ame.
5.2.1.2 Main Menu
This function sho#s the main menu #ith 'uttons for a ne# ame)
one for an eit) and one for an a'out pae. There is a$so a menufunction to sho# the settins.
5.2.1.2.1 9bout
This function initiates a dia$o 'o that pops up. ,t sho#sinformation a'out "udo*u ame and ru$es of the ame.
5.2.1.2.2 Settin!s
This function pops up a menu #ith (arious settins for the
"udo*u ame. The settins are stored $oca$$& and are erased
after the ame is eited.
32
-
7/26/2019 AndroidReq Game
33/40
5.2.1.2.2.1 Music
This function turns the music on and off.
5.2.1.2.2.2 ints
This function turns the hints on and off.
5.2.1.2.3 xit
This function eits the main menu of the "udo*u and ta*es
the user 'ac* to the main menu of the ame suite.
5.2.1.3 *ew Game
This function is acti(ated #hen the ne# ame 'utton is pressed.
%fter it is pressed a dia$o 'o appears #ith the user to se$ect thedifficu$t& $e(e$. %fter the se$ection) this function $oads the pu$e
and starts the main ame function.
5.2.1.3.1 %ifficult(This function a$$o#s the user to se$ect the difficu$t& $e(e$.
The difficu$t& $e(e$s are eas&) medium) and hard. nce thedifficu$t& is se$ected it is store in the data o'-ect. Then the
pu$e is retrie(ed 'ased on the difficu$t&.
5.2.1.3.2 oad +u,,le
This function ta*es the pu$e from the difficu$t& data
o'-ect and passes it to the main ame function to 'e dra#n.
5.2.1.4 Main Game
This function $oads the main ame and a$$o#s the user to p$a& the
ame. hen a ti$e is se$ected) it sho#s the num'ers that can 'ep$a&ed. ,t ca$$s the hints function to co$or squares different$&. This
function is run a$$ the num'ers are fi$$ed or the ame is eited.
5.2.1.4.1 %raw -oard
(er& time a num'er is se$ected then the 'oard is redra#n
to sho# those chanes. This function dra#s the $ines)
num'ers) 'ac*round) and different co$ors for the hintedti$es.
5.2.1.4.2 Select 8ile
This function dea$s #ith #hen a user se$ects a ti$e on the
'oard. hen a ti$e is se$ected it is turned a different co$or.
,t then ca$$s the hints function and 'rins up the se$ectnum'ers function.
5.2.1.4.3 Select *umbers
33
-
7/26/2019 AndroidReq Game
34/40
This function 'rins up a dia$o 'o that sho#s the
a(ai$a'$e num'ers to se$ect for that ti$e. nce the num'er is
se$ected it sends it to the main ame function to et dra#n.
5.2.1.4.4 ints
This function oes throuh the 'oard and finds thea(ai$a'$e num'ers for each ti$e. ,t uses the amount of
num'ers a(ai$a'$e to pic* a co$or for that ti$e.
5.2.1.4. nd Game
This function ends the current ame and oes to the main
menu of "udo*u.
5.2.2 Software Interface %escription"udo*u uses one interface that the user can see. The one that the& see is
throuh the ce$$ phone. The ce$$ phone must 'e runnin the %ndroid
operatin s&stem.
5.2.2.1 xternal mac$ine interfaces
The ame #i$$ run on t#o different machines. ne is an emu$ator
of a ce$$ phone that is used for de(e$opment and testin. The other
is the users ce$$ phone that hosts the ame. The ame must 'ecompati'$e #ith the %ndroid operatin s&stem.
5.2.2.2 xternal s(stem interfaces
The ame does not use an& eterna$ interfaces. %$$ components ofthe ame are interna$.
5.2.2.3 uman interfaceThis is the main interface that the user #i$$ interact #ith. The
interface #i$$ a$$o# the user to use the phones touch screen
ser(ices and ana$o 'uttons. This interface is c$ear and eas&to use. ,t sho#s 'uttons and tet so the user can understand
#hat is oin on.
5.2.3 'ontrol flow descriptionThe contro$ f$o# of the #ord search starts #hen the user starts a ne#
ame. %fter the ne# ame is started there #i$$ 'e different states of the
ame. This continues ti$$ the ame is finished. This descri'ed in section5.0 and its su'sections.
5.3 -e$avioral Model and %escription
5.3.1 %escription for software be$avior5.3.1.1 vents
5.3.1.1.1 *ew Game -utton +ressed
% ne# ame is started) pu$e dra#n) and 'oard is dra#n.
34
-
7/26/2019 AndroidReq Game
35/40
-
7/26/2019 AndroidReq Game
36/40
5.3.1.2.4 Menu
This pae is sho#n #hen the ana$o menu 'utton is pressed
on the phone. ,t sho#s a settins 'utton.
5.3.1.2. Settin!s
The settins pae a$$o#s the user to chane the settins forthe music and hints of the ame.
5.3.1.2. ints
This disp$a&s a 'utton to turn onEoff hints.
5.3.1.2.5 Music
This disp$a&s a 'utton to turn onEoff music.
5.3.1.2.6 %ifficult( Selected
This disp$a&s a dia$o 'o #ith the options to se$ect the
difficu$t& of the ame.
5.3.1.2.7 8ile Select
This is the main pae of the ame to 'e disp$a&ed. ,t sho#s
the 'oard dra#n and a$$o#s the user to se$ect a ti$e or end
the ame.
5.3.1.2.10 *umber Select
From the hints function the num'ers a(ai$a'$e are retrie(ed.
,t disp$a&s the num'er is a dia$o 'o #ith a 'utton foreach a(ai$a'$e num'er.
5.3.2 State 8ransition %ia!rams
36
-
7/26/2019 AndroidReq Game
37/40
)i!ure eleven: Sudo/u State %ia!ram
6.0 &estrictions? imitations? and 'onstraints
The app$ication is 'ein de(e$oped for the %ndroid operatin s&stem and as such shou$d
'e compati'$e #ith at $east the ma-orit& of the current (ersions of %ndroid #hich are 1.1)1.5) 1.6) 2.0) and 2.0.1. The app$ication must 'e desined to disp$a& correct$& on the #ide
rane of mo'i$e phones #hich run the %ndroid operatin s&stem. The o(era$$ app$ication
and its indi(idua$ parts must 'e desined to run smooth$& and quic*$& on the re$ati(e$&$imited processin po#er of mo'i$e de(ises.
7.0 alidation 'riteria
a$idation for the app$ication #i$$ most$& 'e focused around the end user use case. hi$e
not a$$ possi'$e scenarios can 'e tested (a$idation #i$$ consist of testin a reasona'$e
num'er of cases to dec$are that a$$ cases shou$d #or*.
7.1 'lasses of tests
7.1.1 #elcome Screen
37
-
7/26/2019 AndroidReq Game
38/40
+ o(e 'et#een the e$come screen and the a(ai$a'$e ames mu$tip$e
times and in (ar&in orders.
7.1.2 #ord Searc$
+ "e$ect *no#n (a$id #ords for mu$tip$e pu$es.
+ "e$ect *no#n in(a$id #ords.+ nd ame) eit proram) and re+$aunch.
7.1.3 'onnect )our
+ :un throuh mu$tip$e ames from start to finish #ith (ar&in end
ame scenarios.
+ it proram mid ame and re+$aunch.
7.1.4 -attles$ip
+ :un throuh mu$tip$e ames from start to finish #ith (ar&in end
ame scenarios.
+ it proram mid ame and re+$aunch.
7.1. an!man
+ :un throuh mu$tip$e ames from start to finish #ith (ar&in end
ame scenarios.
+ it proram mid ame and re+$aunch.
7.1. Sudo/u
+ :un throuh mu$tip$e ames from start to finish #ith (ar&in end
ame scenarios.+ it proram mid ame and re+$aunch.
7.2 xpected software response
7.2.1 #elcome Screen
+ ,ndi(idua$ shou$d $aunch and c$ose c$ean$& and smooth$&) returnin
to the e$come screen #hen c$osed.
7.2.2 #ord Searc$
+ a$id #ords shou$d 'e accepted and added to the current score.
+ ,n(a$id #ords shou$d 'e re-ected.+ !ame shou$d open and c$ose c$ean$& and hih score shou$d 'e
persistent #hen re+$aunchin.
7.2.3 'onnect )our
+ ,ndi(idua$ chips shou$d 'e p$aced proper$& #hen specific co$umns are
se$ected. The ame shou$d end #hen four chips of the same co$or connecthorionta$$&) (ertica$$&) diaona$$&.
+ !ame shou$d open and c$ose c$ean$& and ame state shou$d 'e restored if
the app$ication #as c$osed mid ame.
38
-
7/26/2019 AndroidReq Game
39/40
7.2.4 -attles$ip
+ ,ndi(idua$ shots shou$d reister as hits #hen the& occur at a $ocation
occupied '& an opponents ship. The ame shou$d end #hen a$$ enem&ships ha(e 'een destro&ed
+ !ame shou$d open and c$ose c$ean$& and hih score shou$d 'e
persistent #hen re+$aunchin.
7.2. an!man
+ ,ndi(idua$ $etters shou$d reister as 'ein part of the taret #ord if the&are. ,ncorrect $etters shou$d resu$t in the addition of a 'od& part to the
hanman. The ame shou$d end #hen either the hanman is comp$ete or
the taret #ord is comp$eted.
+ !ame shou$d open and c$ose c$ean$& and hih score shou$d 'epersistent #hen re+$aunchin.
7.2. Sudo/u
+ ,ndi(idua$ entries shou$d 'e reistered on the 'oard and the ameshou$d end #hen the pu$e has 'een so$(ed.
+ !ame shou$d open and c$ose c$ean$& and hih score shou$d 'epersistent #hen re+$aunchin.
7.3 +erformance bounds
%$$ ames and their indi(idua$ su's&stems shou$d run smooth$& and quic*$&.
10.0 9ppendices
10.1 +roduct Strate!iesur product #i$$ 'e $i*e$& su'mitted in the %ndroid ar*et
-
7/26/2019 AndroidReq Game
40/40
)i!ure twelve: 9ndroid ;S mulator