Solve triangle solitaire puzzle: Difference between revisions

Some tidying up done.
No edit summary
(Some tidying up done.)
Line 1:
{{draft task}}
{{task}} IQ Puzzle a triangle of 15 golf tee's
This is typically seen at
Cracker Barrel where one tee is missing and the remaining
tees jump each other until one tee is left.
The fewer tees left the higher the IQ score. peg #1 is the
top center and bottom row
pegs 11 thru 15
reference picture http://www.joenord.com/puzzles/peggame/
Task Print a solution to solve the puzzle leaving one peg
Not implemented variations Start with empty peg in X and
solve with one
peg in position Y Python version 2.7.2
 
{{task}} An IQ Puzzle is a triangle of 15 golf tee's
=={{header|Python}}==
This is typically seen at
Cracker Barrel where one tee is missing and the remaining
tees jump each other until one tee is left.
The fewer tees left the higher the IQ score. peg #1 is the
top centercentre andthrough to the bottom row
which are pegs 11 through to 15.<br>
(Note: need ASCII art version of reference picture http://www.joenord.com/puzzles/peggame/)
 
;Task description:
<lang Python >
Task Print a solution to solve the puzzle leaving one peg
# IQ Puzzle a triangle of 15 golf tee's typically seen at Cracker Barrel where one tee is missing
Not implemented variations Start with empty peg in X and
# and the remaining tees jump each other until ne tee is left. The fewer tees left the higher the IQ
solve with one
# score. peg #1 is the top center and bottom row pegs 11 thru 15
peg in position Y Python version 2.7.2
# reference picture http://www.joenord.com/puzzles/peggame/
# Task Print a solution to solve the puzzle leaving one peg
# Not implemented variations Start with empty peg in X and solve with one peg in position Y
# Python version 2.7.2 --EMarch -- Oct 16, 2014--
 
=={{header|Python}}==
#
 
<lang Python >#
# Draw board triangle in ascii
#
Line 130 ⟶ 125:
</lang>
 
{{out}}
OUTPUT
<pre>
1
. 3
Line 221 ⟶ 217:
. . D . .
Peg B jumped over C to land on D
</pre>
Anonymous user