Added a isWon function

This code havn't been tested.
This code will break on nullpointer if the box array is empty