This software offers a sequential games framework that features an object-oriented interface for enhanced usability and programming flexibility.
To use Games::Sequential, developers need to pass an object that represents the initial state of the game as the first argument to the new() function. This object must include the copy() and apply() methods. If developers use Games::Sequential::Position as their base class, the copy() method will be provided. Developers must implement the apply() method to take a move and apply it to the current position, creating the next position in the game.
Developers can create their own class by using the package My::GamePos and using Games::Sequential::Position as a base. From there, developers can implement their own apply() method. Then, developers can use Games::Sequential to create a new game with $pos and start playing. Developers can use the move() function to make a move and the undo() function to undo the last move.
Overall, Games::Sequential provides a streamlined way to produce sequential games while keeping track of moves and enabling undoing moves. The OO interface makes it easy for developers to implement and customize their own games.
Version 0.4.6: N/A