ucsb-cs56-projects / cs56-games-poker

-
MIT License
2 stars 11 forks source link

Refactor PokerGame.java for multiplayer flexibility #46

Closed jalexanderqed closed 6 years ago

jalexanderqed commented 8 years ago

Modify PokerGame.java so that it can arbitrarily handle two (or more, for additional credit) players and does not depend on the "player vs. computer" paradigm. Currently, it is extended by PokerSinglePlayer.java, so it will also require significant changes. I would recommend migrating from "player vs. computer" interaction to "player vs. player" interaction, where one of these players can arbitrarily be the computer, with its logic implemented either in a separate class or in PokerSinglePlayer.java. If the first option (a ComputerPlayer class) is chosen, it may be possible to eliminate PokerSinglePlayer.java and have a generic Player interface implemented by both the class handling user input and the ComputerPlayer class. This issue should be worked on AFTER #36, at the same time as or in preparation for #33, and in preparation for (and keeping in mind) the multiplayer functionality requested by #39. If done correctly, this may make adding multiplayer support very easy indeed!

jalexanderqed commented 8 years ago

F16 OK (250 pts)

sean-shelton commented 6 years ago

For a proper refactor, this deserves full points

sean-shelton commented 6 years ago

F17 OK (250 pts)

Sierrasch commented 6 years ago

The amount of credit for this one will definitely depend on how cleanly it is done. If done as suggested above and keeping the game logic and player logic separate so it is easy to attach an AI or an actual player to a game as needed, it will be worth full credit. It will be tempting to complete this by copy and pasting a bunch of code and making the codebase a mess, but it will not receive as much credit.

Sierrasch commented 6 years ago

W18 OK (350 pts)

Sierrasch commented 6 years ago

Completed W18