Pyramid is a solitaire variant, the rules of which are explained here.
The point of this exercise is to demonstrate elegant programming style, an intelligent computer player, and speed of execution. The program must minimally take a number of games to play as its argument, and exit printing a line of the form:
The score should be the average over all the games based on the scoring system given on the page above.N games played in T.T seconds. Average score: S.SS.
As a nice feature, some sort of verbose mode for individual game blow-by-blows would be a bonus.
Submit Date | Language | Author | Filename | Lines | Score |
Time |
---|---|---|---|---|---|---|
2006/02/17 | Ruby | David Bushong | pyramid.rb | 237 | -6.8 | 25.76 |