Advanced Software Design and Implementation (CS 308)

Advanced Software Design and Implementation

Advanced Software Design and Implementation focused on teaching students about good design techniques and programing practices to prepare them for software engineering roles. The class was structured around three major group projects. In addition to programming, the class was heavily focused on the importance of documenting your code and writing clear design documents (in Markdown) explaining each design and discussing choice and alternative decisions.

Cellular Automata:

The first project was a Cellular Automata Simulation (for example, Conway’s Game of Life). The project required students (in teams of three) to build a program that would parse an XML file that contained initial state parameters about the simulation and rules for how cells would live and die. The simulator had to then allow the users to “play” the simulation or step through it one state at a time.

Cell Simulator Demo (Left: Wild Fire Sim, Right: Water Percolating Sim)

Cell Simulator Final Design Report

SLOGO Drawing Program

The Second Project involved building a SLOGO Language Interpreter. For this assignment, we were assigned to teams of 5 students and tasked with building a complete solution that could read in commands (or files containing lists of commands) which would describe the movement, orientation, color, and width of a pen that had a turtle icon. The program had to be able to handle conditional instructions, loops, and recursion.

Drawing using SLOGO Commands

SLOGO Final Design Report

Card Game Engine

The Final Project was to design a flexible game maker that can support multiple types card games. The program needs to allow users to design their own, unique card games in a no-code environment.

The goal of this application is to design a program that can build a card game which can
have rules that are configurable by a user and can be played by multiple players.

The rules of the game are configurable by the user through a “Builder“ companion program. The user is able to create
conditions to specify requirements for different `Stages` of each round, turn, and game, such as checking the number of cards in a players hand at the end of a turn to see if the player has won.

Flexible Design

This design is very flexible because any number of games can be created and saved as a JSON file.
`Builder` and `Runner` are also completely separate from each other and can be run independently of each other. Allowing
games to be previously generated and run at a later time (or saved to the cloud using Firebase and run on a different computer).

The user can create a large variety of different games by changing the rules and conditions of the game and which stages are enabled or disabled.

High-Level Design

The project is broken into three parts.

  • Builder

The Builder provides an interface for a user to build and save game files which can be later run. The interface accommodates multiple language options, a custom casino theme, and dynamic rules, parameters, and validation schemas.

  • Parser/File Manager/Translator

The Parser/File Manager loads and saves games and game templates. It also loads valid parameters, rules, and conditions for the Builder to offer to users to include in their custom games.

The i18n Translator manages Error message translation and mappings between user representation and class representation of rules in games for the entire project. It acts as a layer of abstraction to restrict direct access to the resource files.

  • Runner

The runner provides an interface for a user to load and play game files. Creating a board and players that are governed by rules specified in a “game template”. The Runner displays controls that enable the user to complete allowed rules that have been defined by the builder.

Assumptions or Simplifications:

Stages

Each of the parts of the game are represented in the Rules Builder as a “Stage.”

  •  Game – The game stage is the top level stage. It contains the game rules, the players, and the game controller.
  • Round – The round stage contains the round rules and a turn
  • Turn – The turn stage contains the turn rules, and a list of phases
  • Phase – A phase is a part of a Players turn. The phase stage contains
    • The player can only move on to the next phase if the current phase is complete. For example, in Gin Rummy the player cannot discard a card until they have played a valid set or hit onto an existing set.
    • Phases contain contain “PlayerActions“ which are the actions that the player can take during the phase.
    • Phases contain “Conditions“ which are the rules that must be met for the phase to be complete.

      Screenshot of Card Game

Gin Demo Video

Card Project Final Design Report