Completed implementation of the original algorithm.
Added the class Actions.java because actions have Type and Value.
Added a test class for the algorithms, with a simple test for the original algorithm.