Sunteți pe pagina 1din 16

JAMS Participant Materials

Welcome to the JAMS workshop! This document contains useful reference information for the
workshop, including schedule, team assignment, and team evaluation criteria. This document, as well as
all of the PowerPoint presentations that will be used throughout the week, may be found at
http://lawolf.net/jams.

Contents of this packet:

SCHEDULE.......................................................................................................................................................................3

VERSION 1 – ASSUMING EID FALLS ON FRIDAY, 10 SEPTEMBER.............................................................................................3


VERSION 2 – ASSUMING EID FALLS ON THURSDAY, 9 SEPTEMBER..........................................................................................4

TEAM ASSIGNMENT............................................................................................................................................ 5

PROJECT DESCRIPTION...................................................................................................................................................5
DELIVERABLES & DUE DATES..........................................................................................................................................5
EVALUATION................................................................................................................................................................ 6

DOCUMENT TEMPLATES...................................................................................................................................... 6

SAMPLES............................................................................................................................................................. 7

FUNCTIONAL SPECIFICATION...........................................................................................................................................7
Overview................................................................................................................................................................7
Goals and Non-Goals.............................................................................................................................................7
Goals.................................................................................................................................................................................. 7
Non-Goals.......................................................................................................................................................................... 8
Scenarios................................................................................................................................................................8
Functional Design...................................................................................................................................................8
User Interface.................................................................................................................................................................... 8
Game Play.......................................................................................................................................................................... 9
Player Management........................................................................................................................................................... 9
Game Statistics.................................................................................................................................................................. 9
Computer Player.............................................................................................................................................................. 10
Security................................................................................................................................................................10
Implementation Plan...........................................................................................................................................10
Deployment Plan..................................................................................................................................................11
Implementation Details.......................................................................................................................................11
Namespace...................................................................................................................................................................... 11
Gameboard...................................................................................................................................................................... 11
Player............................................................................................................................................................................... 11
Game............................................................................................................................................................................... 11
Open Issues..........................................................................................................................................................11
TEST PLAN................................................................................................................................................................ 12
Test Plan Objectives.............................................................................................................................................12
Scope....................................................................................................................................................................12
Features to be tested.......................................................................................................................................................12

1
Features NOT to be tested...............................................................................................................................................12
Test Strategy........................................................................................................................................................12
Test Cases.............................................................................................................................................................12
Feature 1: Alternate between Players..............................................................................................................................12
Feature 2: Validate Basic Moves (legal moves only).........................................................................................................13
Feature 3: Declare the Winner or a Tie............................................................................................................................13
Feature 4: Statistics Table................................................................................................................................................14
Feature 5: Play Timer.......................................................................................................................................................14
Feature 6: Machine Player...............................................................................................................................................14
Open Issues..........................................................................................................................................................15

2
Schedule

Version 1 – assuming Eid falls on Friday, 10 September


Monday, September 6 Tuesday, September 7 Wednesday, September 8 Thursday, September 9 Friday, September 10
9:00 Introduction: Expectations Morning Session: Project Morning Session: AppLab Group Work Session Holiday
for the Week, Software Management (Lauren & Community Knowledge
Lifecycle (Kenny Wolf & Lavoie) Worker (Luke Kyohere)
9:30 Lauren Lavoie)
10:00 Writing Functional Group Work Session Group Work Session
10:30 Specifications (Kenny Wolf)
11:00 Test-Driven Development
(Lauren Lavoie)
11:30
12:00 Object-Oriented Design
12:30 (Kenny Wolf)
1:00 Lunch Break
1:30 Facilitator Office Hours Facilitator Office Hours Facilitator Office Hours
2:00 Introduction to the group
2:30 activity (Kenny Wolf &
Lauren Lavoie)
3:00 Initial group work session:
3:30 setup, assign roles, start
4:00 working
4:30
5:00 Team Presentations (15 x 8
5:30 minutes each)
6:00
6:30
Awards
7:00
8:00

Version 2 – assuming Eid falls on Thursday, 9 September


Monday, September 6 Tuesday, September 7 Wednesday, September 8 Thursday, September 9 Friday, September 10

3
9:00 Introduction: Expectations Morning Session: Project Morning Session: AppLab Holiday / Facilitator Office Team Presentations (15 x 8
for the Week, Software Management (Lauren & Community Knowledge Hours minutes each)
Lifecycle (Kenny Wolf & Lavoie) Worker (Luke Kyohere)
9:30 Lauren Lavoie)
10:00 Writing Functional Group Work Session Group Work Session Awards
10:30 Specifications (Kenny Wolf)
11:00 Test-Driven Development
(Lauren Lavoie)
11:30
12:00 Object-Oriented Design
12:30 (Kenny Wolf)
1:00 Lunch Break
1:30 Facilitator Office Hours Facilitator Office Hours
2:00 Introduction to the group
2:30 activity (Kenny Wolf &
Lauren Lavoie)
3:00 Initial group work session:
3:30 setup, assign roles, start
4:00 working
4:30
5:00
5:30

4
Team Assignment

Project Description
 Implement a computer game version of your favorite board or card game
o For example: Checkers, Omweso, Boggle, Hearts, Blackjack, Othello, Scrabble, Yahtzee
o The game must have at least two players
o The game must have a basic visualization
 The program must implement the rules of the game being implemented
o Only allow valid “moves”
o Keep score if appropriate
o Determine the winner and end the game
 There are a number of optional enhancements that will help improve your score, such as:
o Networked play
o Computer player
 Use whatever technology you want
o All of our examples have been in Java and VB
o You are welcome to implement your game as a website or a desktop application
o The machines in the lab are pre-installed with:
 JCreator, Eclipse (Java)
 Visual Studio (Visual Basic, C#, ASP.NET)
 WAMP Server
 Dreamweaver
 You are required to implement some visual representation of the game
o In order to meet the baseline requirements, the visuals need not be sophisticated
o A range of options exist for visual representation:
 HTML
 .Net Winforms (Visual Basic or C#)
 Java Swing
 Console UI (ASCII art)

Deliverables & Due Dates


Item Description Due Date
Functional Specification A functional specification describing the Tuesday afternoon
application to be built, based on the provided
template. You will be judged on how well your
final application adheres to the spec.
Test Plan A test plan describing the application’s success Tuesday afternoon
criteria and defining the individual test cases to
be built, based on the provided template. You
will be judged on how well you implement the
test plan, and your project will not be
considered successful if your tests do not pass.
Demo of Partial Application Sometime before the end of Wednesday, show Wednesday afternoon
a demo of your partially-completed application
to one of the workshop facilitators in order to
receive credit for this deliverable.
Demo of Working Test Cases Sometime before the end of Wednesday, show Wednesday afternoon
a demo of your in-progress, passing test cases
5
to one of the workshop facilitators in order to
receive credit for this deliverable.
Presentation & Demo for All Presentation to your peers on the final day of Thursday or Friday (TBD based on
Participants the workshop, including a demo of your Eid)
application and tests. A PowerPoint template
will be provided.

Evaluation
All projects will be evaluation by JAMS facilitators. There are two components to evaluation:

 Baseline criteria. These criteria are required to completed by all teams, and comprise the baseline score. Up to
100 points may be earned for satisfying the baseline criteria.
 Optional criteria. These criteria are optional, and will allow teams to differentiate themselves by implementing
more advanced features. They should only be attempted by teams who are confident that they will satisfy all of
the baseline criteria. Teams may earn bonus points by implementing the optional criteria, as a percentage of
their baseline score.

Baseline Criteria: Required Max Points Additional Criteria: Optional Max Bonus
Functional specification 15 Application has relatively complex 20%
rules/game play
Test Plan 15 Application has sophisticated 30%
graphics/UI
Application compiles & runs 10 Application implements a computer 30%
player (max points awarded only for a
very “smart” AI implementation)
Application adheres to the spec, 25 Networked game play 20%
and implements the rules of the
game, including scoring (if
appropriate) and ending the game
Demo of working test cases for 20 Other cool features 30%
facilitators
Presentation & demo for 15
workshop attendees

Document Templates
You may download templates from the following locations:

 Functional Specification Template


 Test Plan Template
 Application Presentation & Demo Template

6
Samples
Functional Specification
The following is a sample functional specification for a Tic-Tac-Toe game.

Overview
Tic-tac-toe is a game for two players, X and O, who alternate marking spaces in a 3x3 grid with their symbol. The player
who successfully places a set of three marks in a horizontal, vertical, or diagonal row wins the game. If no player can
create a horizontal, vertical, or diagonal row then the game is a draw. Player X goes first. As it has a simple set of rules, tic
tac toe provides leisure entertainment for people of all ages.

Goals and Non-Goals

Goals
 [P1] Support two human players in a game that is run as a client application
 [P1] Use a graphical representation of the players and game board
 [P1] Alternating turns between the players starting with X
 [P1] Declare a winner when a player has successfully placed three marks in a row
 [P1] Declare a tie when no player can make a winning move
 [P1] Support for starting a new game after the initial game has completed
 [P2] Allow the game to be run inside a web-browser
 [P2] Use multi-colored graphics in the game visuals
 [P2] Support custom player names
 [P2] Tabulate, store, and display statistics on players’ performance
 [P2] Support menu-based commands for new game and quit
 [P3] Add a timer to limit the amount of time a player is allowed to spend on a turn
 [P3] Allow for the two players to be on separate machines and play through the network
 [P3] All the user to save in-progress games
 [P3] Have one player be a computer-based (AI) player
 [P3] Allow player O to start a game

7
Non-Goals
 Support for any grids larger than 3x3
 Support for non-grid shaped game boards
 Animation of game play

Scenarios
Richard has an afternoon free. He calls up his friend Joseph and invites him over to play tic-tac-toe. Richard launches tic-
tac-toe and a 3x3 grid appears on the screen. They play a game, Joseph connects three Os on the right-most column and
is declared the winner.

Lydia has tic-tac-toe installed on her machine and wants to know how many games she has won so far. She launches tic-
tac-toe, chooses Player Performance, and enters her name into the edit box. The system tells her that she has won 32
games so far, lost 2 games and tied 19 games.

Functional Design

User Interface
Main Window

The UI for tic-tac-toe is a Windows Form that consists of line and button controls arranged in a 3 x 3 grid:

Players alternatively interact with the grid by clicking on an available button. A label on the upper-left corner identifies
the current player that needs to make a move.

When a player wins, or no player is able to win, the label is updated with the appropriate game conclusion text.

High Scores

8
[TODO: insert screenshot of side pane that shows top-10 scores + timer]

Menus

File->New Game…

 At any point, a user can select this option to start a new game. If a game is in progress, then a dialog will appear
to confirm that they want to abandon their current game.

File->Exit

 At any point, a user can select this option to exit the application. If a game is in progress, then a dialog will
appear to confirm that they want to abandon their current game.

Game Play
Game play for tic-tac-toe should conform to the following flowchart:

Ending the Game

The game will conclude in one of two ways:

1. A player completes a row of three squares with their mark – that player is declared the winner.

9
2. There are no possible ways for either player to create a row of three squares with their mark – the game is
declared a tie.

On conclusion of the game, the UI is updated.

[TODO: add screenshot of game ending]

Player Management
[TODO: Add details about player names, preferences, etc.]

Game Statistics
At the conclusion of each game, tic-tac-toe records the following information:

 Start and end time of the game

 Which player’s icon (X or O) won the game

 A win or loss for each player involved in the game

With this information, tic-tac-toe displays the top players and other statistics about the game.
stores information about how many games each player wins and loses. It also stores information about how many games
have been won overall by X or O.

Storage Format

In order to report on high scores, player statistics, and game statistics, a log of the results for all games that are played
are stored on disk in the following format:

<?xml version="1.0"?>
<GameHistory xmlns="http://schemas.samples.jams/tictactoe">
<PlayerStatistics>
<Player name="richard" winsAsX="10" winsAsO="5" lossesAsX="4" lossesAsO="9" />
</PlayerStatistics>
<GameStatistics>
<Game startTime="2010-08-29 20:01:04" endTime="2010-08-29 20:23:52" winner="O" />
</GameStatistics>
</GameHistory>

While using a database with Player and Game tables would allow for richer data management and queries, as well as
avoid redundancy in the above XML format, we have prioritized installation simplicity and do not want to require a
database to be available for playing tic-tac-toe.

Computer Player
If we have time to implement a computer player, we will need to calculate a game tree based on the status of the game
after each move. The game tree tracks the possible legal moves and whether they are favorable for the computer player
or not.

10
The most straightforward algorithm to calculate our next move is minimax.

Security
Priority Security Concern Mitigation

2 If we decide to implement a web-based version of the game, Add encryption (https) and HTTP
then we need to account for denial of service attacks. authentication

Implementation Plan
To implement tic-tac-toe in such a way as to address the goals in priority order, the game will be implemented in the
following phases:

1. Gameboard and game-play logic

2. UI design and visuals for gameboard, players, and winner notifications

3. Hooking up the UI gestures to the game-play logic

4. Advanced features, such as customized player names, timing moves, and showing high scores

Deployment Plan
Tic-tac-toe will be packaged as a single Windows executable. There are no features that require special setup tasks.

11
Implementation Details
Internally, tic-tac-toe has a few major concepts that we represent through objects. These include the game board,
players, and games.

Namespace
All of the classes in our implementation will use a namespace of Jams.Samples.TicTacToe

Gameboard
[TODO: insert details on Gameboard object]

Player
[TODO: insert details on Player object]

Game
[TODO: insert details on Game object]

Open Issues
1. Should we use Windows Forms or WPF for the UI?
2. Should we secure the high-score file, or at least obfuscate it?

12
Test Plan
The following is a sample test plan for the Tic-Tac-Toe game specified above.

Test Plan Objectives


 [P1] Test functional correctness of the game’s underlying methods using white-box unit testing
 [P1] Test that only valid moves are allowed
 [P1] Validate that the game can correctly switch between players and declare the end of the game
 [P2] Test advanced features, like the statistics table, play timer, and computer player, if implemented
 [P3] Performance testing

Scope

Features to be tested
 Basic game play
o The game alternates between players
o Players can place moves
o Only legal moves are allowed
 Ending the game
o The game can declare a winner
o The game can declare a tie
 Player statistics table (if implemented)
 Timer (if implemented)
 Machine player (if implemented)

Features NOT to be tested


 User interface rendering
 Networked play

Test Strategy
We plan to employ mostly white-box unit tests in order to test the application, using Visual Studio’s built-in unit-testing
framework. Each of the following major classes will have at least one unit test:

 Game
 GameBoard
 Player
 GameStatistics

Test Cases

Feature 1: Alternate between Players


Test Case ID Test Case Name Steps Expected Result
1.1 Test basic play 1. Place an X at TopLeft The game control switches
switching 2. Assert that it is now O’s to the next player after
turn each turn (assertions pass)
3. Place an O at Center
4. Assert that it is now X’s
turn

13
Feature 2: Validate Basic Moves (legal moves only)
Test Case ID Test Case Name Steps Expected Result
2.1 Test basic moves 1. Place an X at TopLeft Markers are present at
2. Assert that the board expected positions
records an X at TopLeft (assertions pass)
3. Place an O at Center
4. Assert that the board
records an O at Center
2.2 Disallow player from 1. Place an X at TopLeft Move 2 fails
placing his marker on 2. Place an O at TopLeft
a square occupied by
his opponent
2.3 Disallow player from 1. Place an X at TopRight Move 3 fails
playing on his own 2. Place an O at Center
occupied square 3. Place an X at TopRight

Feature 3: Declare the Winner or a Tie


Test Case ID Test Case Name Steps Expected Result
3.1 Declare winner for a 1. Place an X at TopLeft X is declared the winner
horizontal win 2. Place an O at Center
3. Place an X at TopRight
4. Place an O at
BottomLeft
5. Place an X at TopCenter
3.2 Declare winner for a 1. Place an X at Center O is declared the winner
vertical win 2. Place an O at TopRight
3. Place an X at BottomLeft
4. Place an O at
BottomRight
5. Place an X at TopLeft
6. Place an O at
MiddleRight
3.3 Declare winner for a 1. Place an X at Center X is declared the winner
diagonal win 2. Place an O at TopRight
3. Place an X at TopLeft
4. Place an O at MiddleLeft
5. Place an X at
BottomRight
3.4 Declare a draw when 1. Place an X at TopLeft The game is declared a
no player can win 2. Place an O at TopCenter draw
the game 3. Place an X at TopRight
4. Place an O at MiddleLeft
5. Place an X at
MiddleRight
6. Place an O at Center
7. Place an X at BottomLeft
8. Place an O at
BottomRight

Feature 4: Statistics Table


Test Case ID Test Case Name Steps Expected Result
14
4.1 Update player 1. Start game with two Statistics log has updated
statistics after a players, ‘Joseph’ (X) and win/loss counts for Richard
completed game ‘Richard’ (O) and Joseph
2. Play a series of moves
such that Richard wins
the game
3. Check that the statistics
table shows Wins
incremented by 1 for
Richard, and Losses
incremented by 1 for
Joseph
4.2 Update game 1. Start game with two Statistics log shows a new
statistics after a players, and record the entry for this game, with
completed game time that the game the correct information
started
2. Play a series of random
moves until someone
wins
3. Record the time that the
game finished and the
winner
4. Check that a new Game
has been added to the
game log, with the
correct start time, end
time, and winner

Feature 5: Play Timer


Test Case ID Test Case Name Steps Expected Result
5.1 Player runs out of 1. Place an X at Center X is declared the winner
time 2. On O’s turn,
sleep(maxTurnTime)

Feature 6: Machine Player


Test Case ID Test Case Name Steps Expected Result
6.1 Machine player will 1. Place an X at Center Machine players blocks X’s
block human player’s 2. Machine player places win
win an O
3. Place an X on a square
that will give the human
player two X’s in a line
that does not already
contain an O
4. Machine player places
an O
5. Assert that the O placed
on step 4 blocks X’s win
6.2 Machine player goes 1. Machine player places Machine player plays in
first an X the Center
2. Assert that there is an X
15
in the center square

Open Issues
1. If dev implements the networked play feature, we’ll need to think about some level of security test coverage.
This is not currently covered in the test plan.

16

S-ar putea să vă placă și