CSC207-2022F-UofT / course-project-scramblers

course-project-scramblers created by GitHub Classroom
3 stars 1 forks source link

Dictionary work #81

Closed petesaiacct closed 1 year ago

petesaiacct commented 1 year ago

Corrected calls to DictionaryDataReaderGateway by overloading the constructor to take in a string value with a file location, AND a second constructor with a default value so it can be used with or without a parameter. I then changed and simplified the getter function of getDictionaryFile().

Next, I made DictionaryDataReaderGateway implement CreateDictionaryDataAccessObject, so now it plays nicely with GameState.java

I created an interface DictionaryFunctions which implements getDictionaryFile, getDictionaryMap and verifyWord which simply returns true if word is in list, false if it is not. The string must be in all uppercase, and have no spaces or symbols, it must also not be null.

(I will create a faster version if time)

From these changes, i updated gamestate to include these changes in the setDictionary methods.

I also made some changes to PlaceWordRefillInteractorTest as it wasn't properly setting up the @BeforeAll objects for the dictionary, it is now. HOWEVER, there are other problems with the test that has nothing to do with the dictionary, as there are no Asserts in the test functions.

so @patelhrid please inspect and comment out if you aren't ok with those changes.

and @ethanhonest inspect and cancel out the gamestate setDictionary adjustments.