Documentation

Submitted by: Submitted by

Views: 143

Words: 1713

Pages: 7

Category: Other Topics

Date Submitted: 02/19/2013 02:15 AM

Report This Essay

I. Machine Program Statement

II. Objective/s

In this game, the goal is to reach the exit of the maze. The player will be represented by the symbol '@' in the game. The four arrow keys on the keyboard are used to move, and reach the destination marked by the letter 'F'. How fast can the player make it to the destination?

III. Data Dictionary

Functions |

Function Name | Description | Return Type | Parameters |

main | | int | |

scorekeep | | void | (Int score) |

scorekeep2 | | void | (Int score2) |

scorekeep3 | | void | (Int score3) |

isValidPos | | bool | (int x. int y) |

isValidPos2 | | bool | (Int a, int b) |

isValidPos3 | | bool | (Int c, int d) |

movePlayer | | bool | (player, player.x-1, player.y) |

movePlayer2 | | bool | (Player2 & player2, int a, int b) |

movePlayer3 | | bool | (Player3 & player3, int c, int d) |

Showmap | | void | |

showmap2 | | void | |

showmap3 | | void | |

checkWin | | bool | (int score) |

checkWin2 | | bool | (int score2) |

checkWin3 | | bool | (int score3) |

Game | | void | |

Game2 | | void | |

Game3 | | void | |

Variables |

Identifier Name | Data Type | Local to | Description |

| | | |

Constants |

Identifier Name | Value | Data Type | Description |

| | | |

IV. Screen Shots

V. Program Listing

#include <iostream>

#include <Windows.h>

#include <cstdlib>

#include <time.h>

#include <ctime>

using namespace std;

//Constants

const char WALL='x';

const char EMPTY_SPACE=' ';

const char FINISH_ICON='F';

const char TRAVELLER='@';

const int LEFT = 1;

const int RIGHT = 2;

const int UP = 3;

const int DOWN = 4;

char map[20][20] =

{...