Programming

This program is written in C++ using the Tekkotsu libraries. The code is contained in two files which are available and described below.

BlockChaser.h Header file for the BlockChaser class and the subclasses of BlockChaser.
BlockChaser.cc Implements the BlockChaser class.

The program centers around the BlockChaser class. This class implements the core logic for the algorithm described in the algorithm page. Several subclass of BlockChaser have been created to help specify the color of the target to be grabbed. This heirarchy is described below.

This hierarchy allows for several Tekkotsu behaviors to be written each of which targets a different color. Each of the classes simply changes the paramteters passed to the parent class's constructor. These parameters specify the target color. Implementing the hierarchy in this manner allowed for the core code of the program to not be copied between classes.

The code itself has been commented plase see the code for detail on how exactly the program was implemented. You can also visit the Media page for pictures and videos demonstrating the algorithm in action.