Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860
Nim Project - Huben's Wiki

Nim Project

From Huben's Wiki
Jump to: navigation, search
(C-:)
(Graphical Nim)
Line 40: Line 40:
  
 
== Graphical Nim ==
 
== Graphical Nim ==
* to be formatted soon....
+
# Ch. 15 (Graphics)
I Ch. 15 (Graphics)
+
** get some text in the box from the Display project
get some text in the box from the Display project
+
# Build a pyramid of circles with height and base of 4 circles.
II Build a pyramid of circles with height and base of 4 circles.
+
** start with a right triangle
start with a right triangle
+
** adjust x coords to make pyramid
adjust x coords to make pyramid
+
** adjust coords to center pyramid
adjust coords to center pyramid
+
** adjust coords to allow pyramid to resize with window
adjust coords to allow pyramid to resize with window
+
*** use min of width and height
use min of width and height
+
# Use pyramid to display board instead of text
IV Use pyramid to display board instead of text
+
# Optional: add computer player misere version (lose if take last)
V Optional: add computer player misere version (lose if take last)
+
**if (all rows 2 or less) // endgame
if (all rows 2 or less) // endgame
+
*** maintain odd number of rows with one
maintain odd number of rows with one
+
** else // midgame
else // midgame
+
*** // nimsum = binary exclusive or of all row counts
// nimsum = binary exclusive or of all row counts
+
*** if nimsum == 0 // no forced win
if nimsum == 0 // no forced win
+
**** make any move
make any move
+
*** else // forced win
else // forced win
+
**** remove nimsum pieces from any row
remove nimsum pieces from any row
+
# Read next two chapters, build with point and click interface.
VI Read next two chapters, build with point and click interface.
+

Revision as of 14:40, 30 May 2012

Personal tools
translate