3/21/2012 - Purdue Engineering

Team 9 - Scribacious Rabble
Software Design
William Hess
Paul Rosswurm
Mitch Erdbruegger
Ben Kobin
Project Description

Adaptation of the board game SCRABBLE®

Maintains the traditional physical tile interface...

augmented by ..

Sensing tile location and value

Automatically calculating and displaying scores

Maintaining player profiles

Validating words in the event of a 'challenge'

Exposing game stats over an external interface
PSSCs





An ability to sense the presence and identity of a tile
placed on the board.
An ability to record game specific metrics for a set of
player profiles.
An ability to use a standard dictionary to allow a player
to challenge the validity of the last word played.
An ability to display game relevant information to each
player and allow one user to input game settings.
An ability to communicate game statistics over an
external interface.
Block Diagram
Interfaces


SPI (x4)

LCD

Micro SD (FAT 16 file system)

4-wire mode
Input Capture (x15)


Simple Capture Mode
USB
Considerations



Main program will be flag-driven

Setup, End Game, USB Transfer

Piece Detection: Challenge/End Turn inputs
Memory Considerations

24 kB Program Memory

170 kB Data Memory
Variables


LCD Buffers (1kB per)
gameboard (215 bytes)
Code Hierarchy
Game Flow
startGame():
Input player names
Pseudo-random starting player
gamePlay() loop:
Check player’s skip value
(if skipped, decrement and goto nextplayer)
While piece not on board and End of Turn not pressed
Check Challenge Button – goto challenge()
commit last play
while End of Turn not Pressed
Continuous piece detection using input capture
update player score
put last played word & location in buffer
player = nextPlayer
gameEnd():
Calculate final scores
Read player data from SD and write new updated stats
Display winner and career stats
challenge()
search dictionary on sd for word(s) in buffer
remove player’s last score or increment challenger’s skip value
Code Progress
Code
Progress
SPI
Working
initialize(), sendByte(), getByte()
LCD
initialize(), writeLine(), invertLine()
Working
FileSystem
openFile(), readFile(), writeFile()
Working,
Refining
SD
Working using Library,
Refining
USB
Adapting Library
Input Caputure Logic
Pseudocode
Main
gameSetup(), gamePlay(), gameEnd()
transferData()
Pseudocode
Questions?