Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
asciiGame/island.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
41 lines (37 sloc)
663 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _ISLAND_h_ | |
#define _ISLAND_h_ | |
/** Creates an island instance **/ | |
class Island | |
{ | |
private: | |
int sy, sx, y, x; | |
public: | |
Island(int _y, int _x, int _sy, int _sx) | |
{ | |
y=_y; | |
x=_x; | |
sy=_sy; | |
sx=_sx; | |
} | |
void newIsland() | |
{ | |
WINDOW* isl=newwin(y, x, sy, sx); | |
refresh(); | |
char c='-'; | |
wborder(isl, 0, 0, c, c, 0, 0, 0, 0); | |
wrefresh(isl); | |
} | |
int get_y(){ | |
return y; | |
} | |
int get_x(){ | |
return x; | |
} | |
int get_sy(){ | |
return sy; | |
} | |
int get_sx(){ | |
return sx; | |
} | |
}; | |
#endif |