update generateNextStates. Need to fix it so that if a card can be moved to the foundation it will not be moved anywhere else. Also fixed some other errors and cleaned up.