codeworld-base-0.2.0.0: Replacement base module for CodeWorld

Safe HaskellNone
LanguageHaskell98

Extras.Game.Hanoi

Synopsis

Documentation

solve :: (Number, Number) -> Effect #

solve(pegs,discs) solves the Tower of Hanoi puzzle for the given numbers of pegs and discs

move :: (Number, Number) -> Move #

A move represents the action of moving a disc from the given source peg to the given destination peg

solveWith :: (Number, Number, [Move]) -> Effect #

solveWith(pegs,discs,moves) attempts to solve the Tower of Hanoi puzzle for the given numbers of pegs and discs using the given moves

type Move = [Peg] -> [Peg] #