Implemented canDiscardCards unit test. Cleaned up code.