magefree / magefree/mage

Redundant methods in Player class

Open
#11,134 2 comments 0 reactions 0 assignees View on GitHub
Developers Discussion
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

* `choose(Outcome outcome, Cards cards, TargetCard target, Ability source, Game game)`
* `chooseTarget(Outcome outcome, Cards cards, TargetCard target, Ability source, Game game)`

These methods are extremely similar as implemented in `HumanPlayer`. I can't find any documentation on why one would be used over the other. Perhaps they should be merged into a single method?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing choose and chooseTarget in HumanPlayer, then search for all call sites and overrides of both Player methods. Determine whether their behavior or contracts differ; done means either consolidating them without changing callers or documenting the distinction clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.