You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All three of those games use the same copy-and-pasted code for playing cards and evaluating the tricks on the table. Making those "library" functions that all trick-taking games could use (remember to handle no-trump as well, even though Contract Bridge isn't in the game yet) would help drastically reduce code duplication.
The text was updated successfully, but these errors were encountered:
Mild investigation results: I did break out handle_trick() before I even put in this FR, and I'm not sure further trick evaluation can be made suitably generic. play(), on the other hand, is essentially identical in all three games. There are a lot of internals that it uses, though, so either those need to be parameterized or the code's gonna get ugly.
All three of those games use the same copy-and-pasted code for playing cards and evaluating the tricks on the table. Making those "library" functions that all trick-taking games could use (remember to handle no-trump as well, even though Contract Bridge isn't in the game yet) would help drastically reduce code duplication.
The text was updated successfully, but these errors were encountered: