Thread: Battleship Variable Problem

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    2

    Battleship Variable Problem

    I am in a Computer Programming II class, and I have been sick for a while missing some of the instruction. So, I need to catch up. No one in the class really takes this seriously, so they aren't any help. I am having troubles with my overlap error checking. It works as in it restarts the ship setting process, but if I try to put a different ship over the same spot as the overlapping ships from the previous error, it reports an overlap which is not present. Please, help any way you can, but I would like to try and figure out most of the rest. I just need some guidence in this area. Thank you.

    Code:
    #include <iostream.h>
    #include <fstream.h>
    #include <math.h>
    #include <iomanip.h>
    #include <stdlib.h>
    #include <conio.h>
    #include <ctype.h>
    
    
    	const int Rows = 10;
    	const int Columns = 11;
    	int Index1, Index2;
    	int BattleShipPoint, DestroyerPoint, CarrierPoint;
    	int PatrolPoint, SubmarinePoint;
    	int BattleShipDirection, DestroyerDirection, CarrierDirection;
    	int PatrolDirection, SubmarineDirection;
    	int BattleShipRow, DestroyerRow, CarrierRow;
    	int PatrolRow, SubmarineRow;
    	int PositionRow, PositionColumn, Direction;
    	int Size, Error = 0;
    	int Temporary, Temporary2;
    	char val [Rows][Columns] = {65,43,43,43,43,43,43,43,43,43,43,
    							66,43,43,43,43,43,43,43,43,43,43,
    							67,43,43,43,43,43,43,43,43,43,43,
    							68,43,43,43,43,43,43,43,43,43,43,
    							69,43,43,43,43,43,43,43,43,43,43,
    							70,43,43,43,43,43,43,43,43,43,43,
    							71,43,43,43,43,43,43,43,43,43,43,
    							72,43,43,43,43,43,43,43,43,43,43,
    							73,43,43,43,43,43,43,43,43,43,43,
    							74,43,43,43,43,43,43,43,43,43,43};
    
    void Splash();
    void Instructions(); 
    void Display();
    void ShipPlacement();
    void PlacementError();
    void Overlap();
    
    int main(){
    
    	//int Escape;
    
    	Splash();
    
    	Display();
    
    	Instructions();
    
       /*_cputs( "Type 'Y' when finished typing keys: " );
       do
       {
          Escape = _getch();
          Escape = toupper( Escape );
       } while( Escape != 'Y' );
    
       _putch( Escape );
       _putch( '\r' );    
       _putch( '\n' );    
       	system("pause");
    	system("cls");
    	*/
    			
    	ShipPlacement();
    	
    	return 0;
    
    }
    
    	void Splash(){
    	//Splash Screen
    
    	cout<<"         __                                                 "<<endl;
    	cout<<"         ||     //   //                       ||            "<<endl;
    	cout<<"        ----   //   //                        ---           "<<endl;
    	cout<<"        | ||  //---//                    \\\\  ||| |        "<<endl;
    	cout<<"       ------------------               -----------         "<<endl;
    	cout<<"      | Yeah, it's big  /              \\  SS  Lloyd \\     "<<endl;
    	cout<<"      |                /                \\            \\    "<<endl;
    	cout<<"   //____//____//____//____//____//____//____//____//____// "<<endl<<endl<<endl;
    	cout<<"BBBB            T    T    L           SSSS   H"<<endl;
    	cout<<"B   B           T    T    L          S    S  H      I"<<endl;
    	cout<<"B   B         TTTTTTTTTT  L          S       H"<<endl;
    	cout<<"BBBB    AAA     T    T    L    EEE    SSSS   H HH   I   PPPP"<<endl;
    	cout<<"B   B  A   A    T    T    L   E   E       S  HH  H  I   P   P"<<endl;
    	cout<<"B   B  A   A    T    T    L   E  E   S    S  H   H  I   P   P"<<endl;
    	cout<<"BBBB    AAAA    T    T    L   EEEEE   SSSS   H   H  I   PPPP"<<endl;
    	cout<<"                                                        P"<<endl;
    	cout<<"                                                        P"<<endl;
    	
    	cout << "Welcome to Battleship!!!!\n\n";
    	cout << "Your mission if you chose to except it is to obliterate your oppenent."
    		 <<	"\n\n";
    	cout << "If you chose to except your mission hit enter to the game"
    		 <<	" or otherwise leave.\n" << endl;
    	system("pause");
    	system("cls");
    }
    
    	void Instructions(){
    	//Game Instructions
    
    	cout << "\n" << endl;
    	cout << "The following is an example of the gameboard." << endl;
    	cout << "The rules of the game are as follows.\n" << endl;
    	cout << "The player will attack the computer first.\n" << endl;
    	cout << "During either the players or computer turn, if either hit"
    		 <<	" their opponent then   you recieve another turn immediately.\n" << endl;
    	cout << "The first player to win two out of three rounds wins." << endl;
    	system("pause");
    	system("cls");
    	}
    
    	void Display(){
    	//Game Board
    
    	cout << Error << endl;
    
    	if(Error == 1){
    		PositionRow = 0;
    		PositionColumn = 0;
    		Direction = 0;
    
    		for(PositionRow = 1; PositionRow < 11; PositionRow++){
    
    			for(PositionColumn = 0; PositionColumn < 10; PositionColumn++)
    			{
    
    			val[PositionRow][PositionColumn] = 43;
    			
    			}
    
    			
    			val[PositionRow][PositionColumn] = 43;
    
    		}
    
    		for(PositionRow = 0; PositionRow < 11; PositionRow++){
    
    		val[PositionRow][0] = PositionRow + 65;
    		}
    
    		Error = 0;
    		ShipPlacement();
    		
    		
    	}
    	
    	if(Direction == 3 && PositionColumn < Size){
    		PositionRow = 0;
    		PositionColumn = 0;
    		Direction = 0;
    		Error = 0;
    		
    		for(PositionRow = 1; PositionRow < 11; PositionRow++){
    
    			for(PositionColumn = 0; PositionColumn < 10; PositionColumn++)
    			{
    
    			val[PositionRow][PositionColumn] = 43;
    			
    			}
    			
    			val[PositionRow][PositionColumn] = 43;
    
    		}
    	}
    	if(Direction == 4 && PositionColumn > 11 - Size){
    		PositionRow = 0;
    		PositionColumn = 0;
    		Direction = 0;
    		Error = 0;
    		
    		for(PositionRow = 1; PositionRow < 11; PositionRow++){
    
    			for(PositionColumn = 0; PositionColumn < 10; PositionColumn++)
    			{
    
    			val[PositionRow][PositionColumn] = 43;
    			
    			}
    			
    			val[PositionRow][PositionColumn] = 43;
    
    		}
    	}
    	if(Direction == 1 && PositionRow < Size){
    		PositionRow = 0;
    		PositionColumn = 0;
    		Direction = 0;
    		Error = 0;
    		
    		for(PositionRow = 1; PositionRow < 11; PositionRow++){
    
    			for(PositionColumn = 0; PositionColumn < 10; PositionColumn++)
    			{
    
    			val[PositionRow][PositionColumn] = 43;
    			
    			}
    			
    			val[PositionRow][PositionColumn] = 43;
    
    		}
    	}
    
    	if(PositionColumn > 10 || PositionRow > 11 || PositionColumn < 0 || PositionRow < 0){
    		PositionRow = 0;
    		PositionColumn = 0;
    		Direction = 0;
    		Error = 0;
    		
    		for(PositionRow = 1; PositionRow < 11; PositionRow++){
    
    			for(PositionColumn = 0; PositionColumn < 10; PositionColumn++)
    			{
    
    			val[PositionRow][PositionColumn] = 43;
    			
    			}
    			
    			val[PositionRow][PositionColumn] = 43;
    
    		}
    	}
    
    	if(PositionRow > 11 - Size){
    		PositionRow = 0;
    		PositionColumn = 0;
    		Direction = 0;
    		Error = 0;
    
    		for(PositionRow = 1; PositionRow < 11; PositionRow++){
    
    			for(PositionColumn = 0; PositionColumn < 10; PositionColumn++)
    			{
    
    			val[PositionRow][PositionColumn] = 43;
    			
    			}
    			
    			val[PositionRow][PositionColumn] = 43;
    
    		}
    	}
    
    
    	if(Direction > 4){
    		PositionRow = 0;
    		PositionColumn = 0;
    		Direction = 0;
    		Error = 0;
    
    		for(PositionRow = 1; PositionRow < 11; PositionRow++){
    
    			for(PositionColumn = 0; PositionColumn < 10; PositionColumn++)
    			{
    
    			val[PositionRow][PositionColumn] = 43;
    			
    			}
    			
    			val[PositionRow][PositionColumn] = 43;
    
    		}
    	}
    		
    
    	cout << "   1  2  3  4  5  6  7  8  9  10" << endl;
    	
    		switch(Direction){
    		
    	case 1:
    		for(Index1 = PositionRow; Index1 > PositionRow - Size; Index1--)
    	
    			val[Index1][PositionColumn] = 2;
    
    		break;
    
    	
    	case 2:
    		for(Index1 = PositionRow; Index1 < Size + PositionRow; Index1++)
    			
    			val[Index1][PositionColumn] = 2;
    
    		break;
    		
    	
    	case 3:
    		for(Index2 = PositionColumn; Index2 > PositionColumn - Size; Index2--)
    
    			val[PositionRow][Index2] = 2;
    
    		break;
    
    	
    	case 4:
    		for(Index2 = PositionColumn; Index2 < Size + PositionColumn; Index2++)
    
    			val[PositionRow][Index2] = 2;
    
    	break;
    
    	}
    			
    	
    	for(int Rows2 = 0; Rows2 < 10; Rows2++){
    	for(int Columns2 = 0; Columns2 < 11; Columns2++){
    		cout << val[Rows2][Columns2] <<"  ";	
    	}
    	cout << endl << endl;
    
    	Error = 0;
    	}
    
    
    	
    }
    
    
    	void PlacementError()
    	{
    	if(PositionColumn == 0){
    		cout << "Invalid, Please choose another place for your ship!" << endl;
    		Error = 1;
    		return;
    	}
    
    	if(Direction == 3 && PositionColumn < Size){
    		cout << "Invalid, Please choose another place for your ship!" << endl;
    		Error = 1;
    		return;
    	}
    
    	if(Direction == 4 && PositionColumn > 11 - Size){
    		cout << "Invalid, Please choose another place for your ship!" << endl;
    		Error = 1;
    		return;
    	}
    
    	if(Direction == 1 && PositionRow < Size){
    		cout << "Invalid, Please choose another place for your ship!" << endl;
    		Error = 1;
    		return;
    	}
    
    	if(PositionColumn > 10 || PositionRow > 11 || PositionColumn < 0 || PositionRow < 0){
    		cout << "Invalid, Please choose another place for your ship!" << endl;
    		Error = 1;
    		return;	
    	}
    
    	if(PositionRow > 11 - Size){
    		cout << "Invalid, Please choose another place for your ship!" << endl;
    		Error = 1;
    		return;
    	}
    
    	if(Direction > 4){
    		cout << "Invalid, Please choose another place for your ship!" << endl;
    		Error = 1;
    
    		return;
    	}
    	}
    	
    
    	void Overlap()
    	{
    	Temporary = 99;
    	Temporary2 = 99;
    	for(Temporary = BattleShipPoint; Temporary < 3 + BattleShipPoint; Temporary++){
    		for(Temporary2 = DestroyerPoint; Temporary2 < 2 + DestroyerPoint; Temporary2++){
    		if(Temporary == Temporary2){
    			cout << "Invalid, Please choose another place for your ship!" << endl;
    			Error = 1;
    		
    		}
    		}
    	}
    
    	return;
    	}
    	
    	/*for(Temporary = BattleShipPoint; Temporary < 3 + BattleShipPoint; Temporary++){
    		for(Temporary2 = CarrierPoint; Temporary2 < 4 + CarrierPoint; Temporary2++){
    		if(Temporary == Temporary2){
    			cout << "Invalid, Please choose another place for your ship!" << endl;
    			Error = 1;
    			return;
    		}
    		}
    	}
    	for(Temporary = BattleShipPoint; Temporary < 3 + BattleShipPoint; Temporary++){
    		for(Temporary2 = PatrolPoint; Temporary2 < 1 + PatrolPoint; Temporary2++){
    		if(Temporary == Temporary2){
    			cout << "Invalid, Please choose another place for your ship!" << endl;
    			Error = 1;
    			return;
    		}
    		}
    	}
    	for(Temporary = BattleShipPoint; Temporary < 3 + BattleShipPoint; Temporary++){
    		for(Temporary2 = SubmarinePoint; Temporary2 < 2 + SubmarinePoint; Temporary2++){
    		if(Temporary == Temporary2){
    			cout << "Invalid, Please choose another place for your ship!" << endl;
    			Error = 1;
    			return;
    		}
    		}
    	}
    	for(Temporary = DestroyerPoint; Temporary < 2 + DestroyerPoint; Temporary++){
    		for(Temporary2 = CarrierPoint; Temporary2 < 4 + CarrierPoint; Temporary2++){
    		if(Temporary == Temporary2){
    			cout << "Invalid, Please choose another place for your ship!" << endl;
    			Error = 1;
    			return;
    		}
    		}
    	}
    	for(Temporary = DestroyerPoint; Temporary < 2 + DestroyerPoint; Temporary++){
    		for(Temporary2 = PatrolPoint; Temporary2 < 1 + PatrolPoint; Temporary2++){
    		if(Temporary == Temporary2){
    			cout << "Invalid, Please choose another place for your ship!" << endl;
    			Error = 1;
    			return;
    		}
    		}
    	}
    	for(Temporary = DestroyerPoint; Temporary < 2 + DestroyerPoint; Temporary++){
    		for(Temporary2 = SubmarinePoint; Temporary2 < 2 + SubmarinePoint; Temporary2++){
    		if(Temporary == Temporary2){
    			cout << "Invalid, Please choose another place for your ship!" << endl;
    			Error = 1;
    			return;
    		}
    		}
    	}
    	for(Temporary = CarrierPoint; Temporary < 4 + CarrierPoint; Temporary++){
    		for(Temporary2 = PatrolPoint; Temporary2 < 1 + PatrolPoint; Temporary2++){
    		if(Temporary == Temporary2){
    			cout << "Invalid, Please choose another place for your ship!" << endl;
    			Error = 1;
    			return;
    		}
    		}
    	}
    	for(Temporary = CarrierPoint; Temporary < 4 + CarrierPoint; Temporary++){
    		for(Temporary2 = SubmarinePoint; Temporary2 < 2 + SubmarinePoint; Temporary2++){
    		if(Temporary == Temporary2){
    			cout << "Invalid, Please choose another place for your ship!" << endl;
    			Error = 1;
    			return;
    		}
    		}
    	}
    	for(Temporary = PatrolPoint; Temporary < 1 + PatrolPoint; Temporary++){
    		for(Temporary2 = SubmarinePoint; Temporary2 < 2 + SubmarinePoint; Temporary2++){
    		if(Temporary == Temporary2){
    			cout << "Invalid, Please choose another place for your ship!" << endl;
    			Error = 1;
    			return;
    		}
    		}
    	}
    	}
    */
    
    	void ShipPlacement()
    	{
    	Error = 0;
    	BattleShipPoint = 0;
    	DestroyerPoint = 0;
    	CarrierPoint = 0;
    	PatrolPoint = 0;
    	SubmarinePoint = 0;
    	BattleShipDirection = 0;
    	DestroyerDirection = 0;
    	CarrierDirection = 0;
    	PatrolDirection = 0;
    	SubmarineDirection = 0;
    	BattleShipRow = 0;
    	DestroyerRow = 0;
    	CarrierRow = 0;
    	PatrolRow = 0;
    	SubmarineRow = 0;
    
    
    	cout << "In which column do you want your BATTLESHIP(A NUMBER!!!)!" << endl;
    	cin >> BattleShipPoint;		
    
    	cout << "Which row would you place your BATTLESHIP!	" << endl;
    	cout << "(A = 0, B = 1, C = 2, ETC.)" << endl;
    	cin >> BattleShipRow;
    
    	cout << "What direction do you wish the ship to go?\n" << endl;
    	cout << "(Use UP(1), DOWN(2), LEFT(3), AND RIGHT(4) AS DIRECTIONS)" << endl;
    	cin >> BattleShipDirection;
    
    	PositionRow = BattleShipRow;
    	PositionColumn = BattleShipPoint;
    	Direction = BattleShipDirection;
    	Size = 4;
    
    	Overlap();
    	Error=0;
    
    	if(Error == 0)
    		PlacementError();
    
    	Display();
    
    	Error = 0;
    
    	cout << "In which column do you want your DESTROYER(A NUMBER!!!)!" << endl;
    	cin >> DestroyerPoint;	
    
    	cout << "Which row would you place your DESTROYER!	" << endl;
    	cout << "(A = 0, B = 1, C = 2, ETC.)" << endl;
    	cin >> DestroyerRow;
    
    	cout << "What direction do you wish the ship to go?\n" << endl;
    	cout << "(Use UP(1), DOWN(2), LEFT(3), AND RIGHT(4) AS DIRECTIONS)" << endl;
    	cin >> DestroyerDirection;
    
    	PositionRow = DestroyerRow;
    	PositionColumn = DestroyerPoint;
    	Direction = DestroyerDirection;
    	Size = 3;
    
    	Overlap();
    
    	if(Error == 0)
    		PlacementError();
    
    	Display();
    
    	Error = 0;
    
    	cout << "In which column do you want your CARRIER(A NUMBER!!!)!" << endl;
    	cin >> CarrierPoint;
    
    	cout << "Which row would you place your CARRIER!" << endl;
    	cout << "(A = 0, B = 1, C = 2, ETC.)" << endl;
    	cin >> CarrierRow;
    
    	cout << "What direction do you wish the ship to go?\n" << endl;
    	cout << "(Use UP(1), DOWN(2), LEFT(3), AND RIGHT(4) AS DIRECTIONS)" << endl;
    	cin >> CarrierDirection;
    
    	PositionRow = CarrierRow;
    	PositionColumn = CarrierPoint;
    	Direction = CarrierDirection;
    	Size = 5;
    
    	Overlap();
    
    	if(Error == 0)
    		PlacementError();
    
    	Display();
    
    	Error = 0;
    
    	cout << "In which column do you want your PATROL BOAT(A NUMBER!!!)!" << endl;
    	cin >> PatrolPoint;
    
    	cout << "Which row would you place your PATROL BOAT!	" << endl;
    	cout << "(A = 0, B = 1, C = 2, ETC.)" << endl;
    	cin >> PatrolRow;
    
    	cout << "What direction do you wish the ship to go?\n" << endl;
    	cout << "(Use UP(1), DOWN(2), LEFT(3), AND RIGHT(4) AS DIRECTIONS)" << endl;
    	cin >> PatrolDirection;
    
    	PositionRow = PatrolRow;
    	PositionColumn = PatrolPoint;
    	Direction = PatrolDirection;
    	Size = 2;
    	
    	Overlap();
    
    	if(Error == 0)
    		PlacementError();
    	
    	Display();
    
    	Error = 0;
    
    	cout << "In which column do you want your SUBMARINE(A NUMBER!!!)!" << endl;
    	cin >> SubmarinePoint;
    
    	cout << "Which row would you place your SUBMARINE!	" << endl;
    	cout << "(A = 0, B = 1, C = 2, ETC.)" << endl;
    	cin >> SubmarineRow;
    
    	cout << "What direction do you wish the ship to go?\n" << endl;
    	cout << "(Use UP(1), DOWN(2), LEFT(3), AND RIGHT(4) AS DIRECTIONS)" << endl;
    	cin >> SubmarineDirection;
    
    	PositionRow = SubmarineRow;
    	PositionColumn = SubmarinePoint;
    	Direction = SubmarineDirection;
    	Size = 3;
    
    	Overlap();
    
    	if(Error == 0)
    		PlacementError();
    	
    	Display();
    
    	Error = 0;
    
    	}

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    You need to distill your code down to a small example that demonstrates the problem. Often times just doing that will make the problem obvious.

  3. #3
    C/C++ homeyg's Avatar
    Join Date
    Nov 2004
    Location
    Louisiana, USA
    Posts
    209
    You need to learn some damn formatting.

    Also, you demonstrate a common problem with most programming noobs in which you rely on too many numbers and beat around the bush using those numbers, and you can't find more consise solutions for what you are trying to do.

    The code you posted does not look like you are in Programming 2, btw (unless, of course, Programming 1 was some BS like Visual Basic, then I would understand your code looking like that).

    I have one more thing to point out.

    Code:
    cout<<"         __                                                 "<<endl;
    	cout<<"         ||     //   //                       ||            "<<endl;
    	cout<<"        ----   //   //                        ---           "<<endl;
    	cout<<"        | ||  //---//                    \\\\  ||| |        "<<endl;
    	cout<<"       ------------------               -----------         "<<endl;
    	cout<<"      | Yeah, it's big  /              \\  SS  Lloyd \\     "<<endl;
    	cout<<"      |                /                \\            \\    "<<endl;
    	cout<<"   //____//____//____//____//____//____//____//____//____// "<<endl<<endl<<endl;
    	cout<<"BBBB            T    T    L           SSSS   H"<<endl;
    	cout<<"B   B           T    T    L          S    S  H      I"<<endl;
    	cout<<"B   B         TTTTTTTTTT  L          S       H"<<endl;
    	cout<<"BBBB    AAA     T    T    L    EEE    SSSS   H HH   I   PPPP"<<endl;
    	cout<<"B   B  A   A    T    T    L   E   E       S  HH  H  I   P   P"<<endl;
    	cout<<"B   B  A   A    T    T    L   E  E   S    S  H   H  I   P   P"<<endl;
    	cout<<"BBBB    AAAA    T    T    L   EEEEE   SSSS   H   H  I   PPPP"<<endl;
    	cout<<"                                                        P"<<endl;
    	cout<<"                                                        P"<<endl;
    You see this? That is another problem with noobs; they spend hours creating something like this, when they could be using that time to revise their code and make it better.

    Something like this is good enough

    Code:
    cout<<"Welcome to Battleship!!"<<endl;
    cin.get();
    Let me make it clear, btw, that I'm not trying to be rude at all, I'm just trying to help.
    Last edited by homeyg; 03-27-2006 at 10:05 AM.

  4. #4
    Registered User
    Join Date
    Mar 2006
    Posts
    2
    You would be correct in assuming that year one was some bs like visual basic. I hated that thing. Another thing is, I didn't spend hours on that. Like five minutes tops before he assigned it because I was waiting for him to give me the next assignment sheet. Which a graphical splash screen was required. Anyway, the numerous occurance of numbers was done in a drastic attempt to figure out why error kept appearing as 1 when I know there wasn't an error. So, I should try to seperatlly code just the section that the error appears in? I'll try that. Ideas welcome.

  5. #5
    Registered User
    Join Date
    Feb 2006
    Posts
    312
    Your code is really too long to understand in any detail, so it's difficult to identify error(s). You're essentially repeating the same bits of code over and over - there's a huge amount of redundancy which you could cut down using some well-thought functions.
    You could also group together all the information about each ship using a struct. again, this could drastically cut down the number of seperate variables, aswell as if(..) statements and redundant code.

    eg, instead of having loads of variables with the name Submarine, Battleship, Cruiser attached to them, just do this...

    Code:
    struct boat
    {
        int direction;
        int xcoord;
        int ycoord;
    };
    This essentially creates your own data type "boat".. so now you have a direct relationship between the variables 'xcoord', 'ycoord' and 'direction'.

    Later in your program, you might do this:
    Code:
    boat submarine;
    boat battleship;
    submarine.xcoord=1;
    submarine.ycoord=3;
    battleship.xcoord=5;
    //etc...


    Which IDE are you using? If possible, see if you can set it up to auto-format the code with sensible tabbing. as another poster mentioned, your spacing is not helping the readability of your code.

    [Edited post - couple of typos]
    Last edited by Bench82; 03-27-2006 at 11:19 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  2. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  3. problem with the const variable
    By ssharish in forum C Programming
    Replies: 2
    Last Post: 01-28-2005, 09:53 AM
  4. Problem with a char variable set as a letter
    By 7smurfs in forum C++ Programming
    Replies: 6
    Last Post: 12-10-2004, 01:25 PM
  5. Peculiar Problem with char variable in C Language
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 10-31-2001, 04:06 PM