Flipping bits game: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: change was made before example was marked incomplete.)
(example 3 by 3)
Line 394:
 
=={{header|C++}}==
{{incomplete|C++|Output shown should be for 3 by 3 case.}}
<lang cpp>
#include <time.h>
Line 487 ⟶ 486:
 
int main( int argc, char* argv[] )
{ srand( time( NULL ) ); flip g; g.play( 53, 53 ); return system( "pause" ); }
</lang>
{{out}}
<pre>
TARGET:
1 2 3 4 5
a 1 01 0 0 0
b 1 0 1 1 1
c 1 10 0 0 0
d 0 0 0 0 0
e 0 1 1 0 0
 
 
YOU:
1 2 3 4 5
a 0 1 1 10 1
b 0 1 0 0 0
c 0 01 1 1 1
d 0 0 0 0 0
e 1 0 0 1 1
 
Enter rows letters and/or column numbers: abceb
 
Enter rows letters and/or column numbers: abce
 
TARGET:
1 2 3
e 0a 1 1 0 0
db 01 0 01 0 0
dc 0 0 0 0 0
 
YOU:
1 2 3
a 1 1 0
eb 1 0 0 1 1
c 1 1 1
 
Enter rows letters and/or column numbers: c
 
** Well done! **
Used 42 moves.
</pre>