Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#18631 - [foobillard] 3.0a-5 game hangs after a draw in snooker

Attached to Project: Arch Linux
Opened by Émeric Dupont (emeric) - Wednesday, 10 March 2010, 18:56 GMT
Last edited by Eric Belanger (Snowman) - Sunday, 11 July 2010, 02:30 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Eric Belanger (Snowman)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
If a game of snooker ends in a draw (This can only happen in snooker), the game stays in an invalid state. If AI players are in the game, they might try to hole the cue ball, but the game itself will never end. This can be an issue preventing a tournament from finishing.


Additional info:
* package version(s) 3.0a-5
* config and/or log files etc.


Steps to reproduce:
$ foobillard --snooker --gamemode tournament
Wait for a game to end up in a draw (This might take a very long time, since the odds to draw are very low. You might want to modify the code to have it happen faster. See patch below.)
Note how the game can no longer move on without restarting the whole tournament.
To force a draw in a game, simply remove all points awarded or resulting from opponent's fouls:
Index: src/evaluate_move.c
===================================================================
--- src/evaluate_move.c (revision 6)
+++ src/evaluate_move.c (working copy)
@@ -555,12 +555,12 @@
if(foul)
{
act_penalty =MAX(act_penalty,4);
- player[other_player].score += act_penalty ;
+ //player[other_player].score += act_penalty ;
printf("EVAL foul\n");
}
else
{
- player[act_player].score += act_score ;
+ //player[act_player].score += act_score ;
printf("EVAL no foul\n");
textObj_setText(last_fault_text, "x");
}





This task depends upon

Closed by  Eric Belanger (Snowman)
Sunday, 11 July 2010, 02:30 GMT
Reason for closing:  Fixed
Comment by Émeric Dupont (emeric) - Wednesday, 10 March 2010, 19:03 GMT
The attached patch adds handling of draws in snooker games (Draws do not occur in other game types)

Comment by Jan de Groot (JGC) - Thursday, 11 March 2010, 07:59 GMT
Was this patch shared with upstream?
Comment by Eric Belanger (Snowman) - Thursday, 11 March 2010, 08:56 GMT
This project is dead upstream. Website has disappeared. The sources were recently moved to local ftp.
Comment by Eric Belanger (Snowman) - Friday, 02 July 2010, 16:54 GMT
Where does these patches come from? Did you created them yourself?
Comment by Émeric Dupont (emeric) - Monday, 05 July 2010, 12:04 GMT
I made the patches myself. Since I couldn't find an upstream to share them with, I posted them here hoping someone would know what to do with them.

Loading...