Skip to content

patrick-sheehan/CrackerBarrellPuzzle-CSCE420PA1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CrackerBarrellPuzzle-CSCE420PA1

Programming Assignment #1 - Cracker Barrel Game Solver

Patrick Sheehan

CSCE 420

22 January 2014

Sources: haskell.org, stackoverflow.com, piazza, http://www.danobrien.ws/PegBoard.html

This program was written in Haskell. Generally, a board is evaluated to see if there are any possible moves that can be made. If there aren’t any, it is checked to see if it is a success (one peg anywhere, and one peg in a corner). If there are possible moves, evaluate all of them in this recursive pattern. A board is represented as a list of 15 pegs. a peg is a 4-tuple of integers: (row, column, peg number, and if it’s full/empty/invalid). The return type of the recursive functions are ‘Wins’ which is a tuple of representing the total number of successes of a board from every subsequent board (if any), including itself.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published