[Sugar-devel] Porting sugar activity to sugarizer
James Cameron
quozl at laptop.org
Wed Mar 11 23:37:29 EDT 2020
The board is not random in the beginning.
When creating a game to play Implode starts with an empty board state
and injects transformations to confuse that state. The type of
transformations are the exact inverse of those the player requests in
a winning move sequence.
The code is in boardgen.py
The Maze game has a reversible algorithm too.
On Thu, Mar 12, 2020 at 08:55:49AM +0530, Abhishek Tanwar wrote:
> I am porting Implode activity to sugarizer . I read the code a few times and I
> partially understood its working . One thing that I am not able to understand
> is the logic that the game always have an answer despite of random board
> formation in the beginning .
> Is it that the initial state of board is designed according to last state and
> the game is played in a reverse order such that there exist no state in which
> there is no next move to make?
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
--
James Cameron
http://quozl.netrek.org/
More information about the Sugar-devel
mailing list