summaryrefslogtreecommitdiff
path: root/main.h
blob: 72682d3f65ff752403d9941915ee164fd510943c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

#ifndef MAIN_H
#define MAIN_H
extern int loop;
void drawgrid(int x, int y,int w,int h, bool player, SDL_Texture * t);
void drawfield(bool player);
void checkshipbutts();
void checkfieldbutts(bool player);
void checkrotbutts();
void drawship (int x,int y, char data);
int getlen(int ship);
void eraseship(int rship);
void checkships(bool player);
bool placeship(int rx, int ry, int rship, int rdir, bool player);
void AI();
int randr(int min, int max);
int getscore(int x, int y);
std::string readfile(char const * filename);
void writefile(char const * filename, char data[10][10]);
#endif