first homework

this was my final homework- state.rb is the homework rewritten in class