Subversion Repositories sssnakesss

Compare Revisions

Ignore whitespace Rev 8 → Rev 9

/history.txt
0,0 → 1,0
18/24/10 23:29 - Freddie: I think a point struct is needed, so I made one (sort of). Rather than building the sname properties into sssnakesss.cpp I think we should have a vector of class snake. I'm happy to write this class entirley, just want a Go-Ahead. In other news, if I am creating an instance class/struct, do you use class_name::func_name or class_name.func_name? From your code I get the impression it is the same as Static, but this seems wrong/silly. Enjoy. Oh, yeah - lets keep this going, so we know what is happening easily and can explainface stuffs.
/include/point.hpp
0,0 → 1,9
struct point
{
public:
point(int x, int y);
~point();
 
int X;
int Y;
}
/include/snake.hpp
0,0 → 1,17
#include "point.hpp"
#include <vector>
 
class snake
{
public:
snake();
~snake();
nextPoint(point newPoint);
 
vector<point> points; // list of points snake occupies
 
// colour
int R;
int G;
int B;
};
/src/snake.cpp
0,0 → 1,6
#include "snake.hpp"
 
void snake::nextPoint(point newPoint)
{
}
/src/point.cpp
0,0 → 1,7
#include "point.hpp"
 
point::point(int x, int y)
{
X = x;
Y = y;
}