RIT Department of Computer Engineering

Handheld Mastermind

Senior Design Projects II, Fall 2007

Carl Kelso, Michael Ellis, and Ryan Shon

tiger

Table of Contents

  • The TeamOff Page Link
  • The ProjectOff Page Link
  • Project PartsOff Page Link
  • Links and DocumentationOff Page Link
  • Introduction
  • Basic Game Play
  • Project Goals
  • Design
  • Progress
  • Final Picture  
    four pegs

    Introduction

    Mastermind is a game of strategy and analysis. Originally created by Mordecai Meirowitz, it consists of a board with 12 rows of 4 holes for guess pegs, 12 sets of 4 response holes for informing a player of their performance, and a set of 4 holes for a key.

    Basic Game Play

    A 2 player game, each round players assume the roles of the Master Mind and the Code Breaker. The Master Mind selects a random combination of 4 pegs of any available color. This combination is referred to as the key. Typically, there are 6 colors to a game, but there is no reason there can't be more or fewer choices.

    Each round, the Code Breaker attempts to guess the colors and the order of the key. To add strategy to the game, the Master Mind informs the Code Breaker of the number of pegs that match in color and in position. They also are informed of how many of the pegs that don't match in position match in color.

    Project Goals

    The goal of this project is to design and develop a hand-held Mastermind game from the ground up. This includes the selection of appropriate hardware, design of the communication interfaces, and development of a variety of different game scenarios, score keeping, and other pieces of useful information.

    four pegs

    Design

    To facilitate our design, we've decided to construct the circuit using ATMEL's ATMEGA164 microcontroller as our core. This provides a USART to allow us to communicate with a PC, up to 20Mhz clock frequency, and a powerful RISC assembly language for programming.

    To simplify our design, we will use full spectrum LEDs to allow the Code Breaker to make and modify their current guess. A bank of four red LEDs provide the Code Breaker with a means of determining which guess peg is being modified. An up/down switch will allow the Code Breaker to cycle through the colors on a given peg, and an enter key allows them to commit their guess.

    The current design will use the USART (serial port) to communicate with a lite terminal on a PC (written in java) to execute drawing commands and display output on a canvas. This is due to the prohibitive cost of LCD screens for small games. Should an alternative present itself, this design will be modified to allow for onboard graphics support.

    Controller
    four pegs

    Current Progress

    Hardware
                       
    Design Planned,
    Breadboard Populated,
    Hardware Tested,
    Prototype Board Layout Complete,
    Case Materials Tested.
    Prototype Board Placed in Controller

    Software
                       
    USART Supported,
    LED Output Supported,
    Buttons Supported,
    Menu System created,
    Serial Communication and GUI Created,
    Timer Created,
    Memory Storage Created,

    Gameplay
                       
    Single Player Game Created,
    Multi-player Modes Created,
    High Scores Tracked and Displayed,
    Tournament Mode Created,

    Testing
                       
    All Hardware Tested,
    USART Tested,
    LED Support Tested,
    Button Support Tested
    Menu System Tested,
    Single Player Mode Tested,
    Timer Tested,
    Memory Storage and Usage Tested,
    Multi-Player Modes Tested,
    High Score Tracking Tested,
    Tournament Mode Tested,

    Documentation
                       
    Design Spec Written,
    Website Started,
    Site Location Updated,
    Progress Reports Written,
    User Manual Created,
    Final Report Written,

    Contributions



    Carl Kelso Website Design Initial Design Completed, Focusing on other elements
    Interrupt Preliminary Coding USART Code working, PC side is flakey. LED support written. Button support started.
    Hardware Design Circuit assembled and tested, pre-printed boards found, Working on final hardware integration.
    Game Code Created initial skeleton code ,Wrote initialization, created menu system, integrated code, and wrote multiplayer and tournament functionality.
    Documentation Updated progress reports and organized files.
    Michael Ellis Controller Case Design Created Controller out of pine and fiberglass. Constructed controller and buttons. Modified controller to fit the board and buttons correctly.
    Java Terminal Design Completed version 1.0, allows communication via RXTX through serial port.
    Can render images on the screen.
    Game Code Wrote code that compares two colors, compares the guess to the master code, generates a master code according to the difficulty, converts a byte to a decimal number, and General gameplay to be used in each play mode.
    Documentation Upkeep Updated the website, wrote user manual, compiled final report, and organized files and pictures.
    Ryan Shon Interrupt Preliminary Coding Developing code for streaming status into shift registers for display.
    Basic Game Logic Coding  
    Code written Wrote timer module, EEPROM module, random number generator, high score name entry, and view high scores.
    four pegs