Battleship Source Code

download Battleship Source Code

If you can't read please download the document

description

12th grade game project for c++

Transcript of Battleship Source Code

#include#include#include#include#include#include#include#includevoid inst(){ outtextxy(210,110,"welcome to battle ship"); outtextxy(210,120,"use arrow keys to move"); outtextxy(210,130,"Player1 use r to deploy ship"); outtextxy(210,140,"Player 2use r to search for ship"); outtextxy(210,150,"player 1 hides ships"); outtextxy(210,160,"player 2 finds them"); outtextxy(210,190,"PLEASE TURN YOUR CAPS LOCK OFF"); outtextxy(210,200,"PRESS ANY KEY TO CONTINUE"); getch();}void board(){ int i; cleardevice(); line(0,0,0,400); line(0,0,400,0); line(0,400,400,400); line(400,0,400,400); for(i=40;i235))flip=0;elseflip=1; } continue; } if(a==29184) //for r button// { for(int o=0;o