Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 601842 - games-puzzle/einstein-2.0 Patch
Summary: games-puzzle/einstein-2.0 Patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-06 17:23 UTC by BHReach
Modified: 2018-05-01 11:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BHReach 2016-12-06 17:23:12 UTC
1st game always has the same solution. The following patch fixes the problem (attributed to Debian, 06_srand.diff).

--- einstein-2.0.orig/puzgen.cpp
+++ einstein-2.0/puzgen.cpp
@@ -313,6 +313,8 @@
 
 void genPuzzle(SolvedPuzzle &puzzle, Rules &rules)
 {
+    srand(time(NULL));
+
     for (int i = 0; i < PUZZLE_SIZE; i++) {
         for (int j = 0; j < PUZZLE_SIZE; j++) 
             puzzle[i][j] = j + 1;

Also since the ebuild does not call epatch_user, it is a little trickier to get Portage to apply a user patch.

Please add this patch to the others for this program.

Thank you.
Comment 1 Jonas Stein gentoo-dev 2016-12-06 18:27:25 UTC
Thank you for the patch.
Please describe why you think this patch is needed and send this patch also upstream. Do you get the same puzzles after start?
You can paste the link to your upstream report here, if you like.
Comment 2 BHReach 2016-12-06 22:30:42 UTC
In my attempt to report the bug upstream, I discovered that Gentoo has an invalid home page for the project.

Einstein Puzzle Game appears to have a new maintainer and home page.

Alex Karabanov (lksj)

https://github.com/lksj/einstein-puzzle

The latest release 2.1.1 (now over a year old) Appears to have the patch I requested along with several others not in einstein-2.0.

https://github.com/lksj/einstein-puzzle/releases

If you upgrade to the latest version, you can mark this bug as fixed.
Comment 3 Pacho Ramos gentoo-dev 2018-05-01 11:06:00 UTC
[master 8782d52a12f4] games-puzzle/einstein: Version bump
 3 files changed, 43 insertions(+), 2 deletions(-)
 create mode 100644 games-puzzle/einstein/einstein-2.1.1.ebuild