C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28691
Number of posts: 94711

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Rating... Posted by Marc Lorenz on 22 Feb 2007 at 5:29 AM
Can you rate this from 1-10, 10 being the highest. And tell me if it can be easily understood by other people. Thanks.

// Ask user what difficulty to play
// If difficulty is 1 THEN
Draw 9(3x3) boxes
// If difficulty is 2 THEN
Draw 16(4x4) boxes
// If difficulty is 3
Draw 25(5x5) boxes THEN
// END IF

// Set the value of all indices of array v to zero
// Put values 0-x(depending on difficulty) randomly on array v
// Print the values in array v on top of the boxes
// IF value is zero THEN
// Draw a blank box on top of box zero
// END IF

// WHILE user still wants to play

// WHILE user isn't done arranging the boxes in numerical order

// CASE controller OF
up : swap blank box and the box below it
down : swap blank box and the above below it
left : swap blank box and the rightside box
right : swap blank box and the leftside box
esc : end the program
r : reset the game
// ENDCASE

// IF user is done arranging the boxes in numerical order
THEN
// Ask user to play again
// IF answer is yes THEN
// reset the game
// ELSE
// end the program
// END IF

// END WHILE

// END WHILE
Report
Re: Rating... Posted by Lundin on 22 Feb 2007 at 6:13 AM
: Can you rate this from 1-10, 10 being the highest. And tell me if it can be easily understood by other people. Thanks.
:
: // Ask user what difficulty to play
: // If difficulty is 1 THEN
: Draw 9(3x3) boxes
: // If difficulty is 2 THEN
: Draw 16(4x4) boxes
: // If difficulty is 3
: Draw 25(5x5) boxes THEN
: // END IF
:
: // Set the value of all indices of array v to zero
: // Put values 0-x(depending on difficulty) randomly on array v
: // Print the values in array v on top of the boxes
: // IF value is zero THEN
: // Draw a blank box on top of box zero
: // END IF
:
: // WHILE user still wants to play
:
: // WHILE user isn't done arranging the boxes in numerical order
:
: // CASE controller OF
: up : swap blank box and the box below it
: down : swap blank box and the above below it
: left : swap blank box and the rightside box
: right : swap blank box and the leftside box
: esc : end the program
: r : reset the game
: // ENDCASE
:
: // IF user is done arranging the boxes in numerical order
: THEN
: // Ask user to play again
: // IF answer is yes THEN
: // reset the game
: // ELSE
: // end the program
: // END IF
:
: // END WHILE
:
: // END WHILE
:


Seems pretty clear to me, apart from a few minor typos and such. But then I'm a programmer and not "other people" A person who isn't used to reading pseudo code might find it difficult to understand, I suppose.
Report
Re: Rating... Posted by Marc Lorenz on 22 Feb 2007 at 6:44 AM
Seems pretty clear to me, apart from a few minor typos and such. But then I'm a programmer and not "other people" A person who isn't used to reading pseudo code might find it difficult to understand, I suppose.


Well it's my teacher who's going to read it so i guess it's ok. I'll try to make it better.
Thanks again.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.