0

hey,

I am developing this game of snake, just like the nokia phones have. anyway i have worked on windows till now, but now i am using geany on linux. so there are quite some methods which are not standardised for all platforms. one of them is gotoxy() and i have found that there is ncurses() instead on linux. but i dont know the syntax. if anyone out there knows please help me, or if there is some other method to mess with the coordinates of the screen.

Thanks

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by web_master
0

Mr.web_master,
I've searched for a function similar to gotoxy() in ncurses .
I think i found this function:
1-

mvaddch(row,col,ch);

Prints the ch in the given row and column (similar to x=row and y=column)
2-

move(row,col);

move(row,col)
move the cursor to the given position

Therefore the mvaddch function can be written like this:-

move(row,col);
addch(ch);

.

0

Thanks for the reply Ahmed but can u tell me which library this method is in...coz i am unable to find it....

Thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.