Skip to content

Add function to forecast a player's move #75

Description

@jacoblangston

When writing an ai agent, it'd be useful to have a utility function that forecasts a move without changing the state of the current game. Should be able to pass a board state and receive a new board state.

Here is a sample function written in C#:
public Board ForecastMove(Board board, IPly ply)
{
var newBoard = new Board(board);
if (newBoard.ApplyMove(ply))
return newBoard;

        throw new InvalidMoveException();
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions