-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Pla 982 add bestemshe #185
Conversation
Dev to master SG 153 othello pass replay fix
Dev -> Master: SG 154 Backammon Undos
(situation.board.history.score.p2 > 25) || | ||
(situation.moves.size == 0) | ||
|
||
override def specialDraw(situation: Situation) = |
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.
don't you want to change this to false ?
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.
I figured best to leave this clause in (which wont be triggered with regular Bestemshe) but when we get to the point where we are offering FromPosition for all variants then it could be possible to create a position (fen) where the scores start as odd and so a draw is possible. if i remove this code then i think it will just look in winner
and award p2 as a winner in these 'tie' situations.
playUciList( | ||
game.getOrElse(Game.apply(variant.Backgammon)), | ||
game.getOrElse(Game.apply(variant.getOrElse(Variant.default))), |
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.
Is there a difference here between writing Game.apply(<some_param>) and Game(<some_param>) ?
If not, do you prefer I write the apply in the tests I am currently writing for Abalone ?
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.
Both Game.apply(variant)
and Game(variant)
work here. Personally I prefer Game()
to be used when you are instantiating an instance of Game
with its paramter-set and call Game.apply
when you are explicitly instantiating a Game
through an apply
method (in this case
def apply(variant: strategygames.togyzkumalak.variant.Variant): Game = |
Despite that being my personal preference, I don't think this standard is followed throughout the codebase and I have no problem with you doing either approach
No description provided.