Skip to content
Permalink
master
Switch branches/tags

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?
Go to file
 
 
Cannot retrieve contributors at this time
#include <iostream>
#include <vector>
#include <ncurses.h>
#include <cstdlib>
#ifndef SNAKE_H
#define SNAKE_H
struct snakepart{
int x,y;
snakepart(int col, int row);
snakepart();
};
class snakeclass{
int points, del, maxwidth, maxheight;
char direction, partchar, oldalchar, foo;
bool get;
snakepart food;
std::vector<snakepart> snake;
void putfood();
bool collision();
void movesnake();
public:
snakeclass();
~snakeclass();
void start();
};
#endif