-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
F17_lab05 #77
F17_lab05 #77
Conversation
…lity, but remove spaces when creating image icons
…n a BlackjackGui, rather than just calling 'this'
… I ended up changing the bug for changing player names, to just not work, rather than restarting the game completely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add testing for the Card's toString function for retrieving function.
* @return String | ||
*/ | ||
*/ | ||
public String toString(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function needs test coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify, the method public ImageIcon getMyImage(Card c) in BlackjackGui.java was modified to fix issue #76 by doing two things. 1) The file names of the images for each of the cards was changed to represent the original toString method of the Card class, but with the spaces removed. 2) The function getMyImage now calls the toString method of the Card c, and removes the spaces, rather than having a 52+ line switch case block, where a line was used for each card possibility.
I added a test function "test_getMyImage" to BlackjackTest.java to show that all cards have been changed to the correct name, and all can be called using the getMyImage method.
Hopefully this helps clarify some things. Also, don't forget to change the feedback to not have a minus for this issue.
-Added a Todo.txt to organize the work we want to do this quarter.
-Fixed .gitignore so that it ignores .jar files, and also deleted the previous builds.
-Fixed issue #76. The cards images are now named like "3ofSpades.gif" and the block that calls them is not much shorter.
-Started work on issue #73 by moving the actionListeners into TableController and creating a main file. The BlackjackGui file works as the view, and the model is the Blackjack.java file.
-Started work on issue #69. There are now Gui's and controllers for the rules, welcome, name, and bet windows, as well as whatever is left in the BlackjackGui class. The new Gui and controller still reference some variables in the BlackjackGui, but for the most part, they are self-contained. More work needs to be done to have the Guis more loosely connected and fit more closely to the MVC pattern
-Modified issue #75 Changing the players' names in the menubar option now no longer does anything rather than restarting the game.