Addition of win/lose handling

When done, this will address #17.