proto/game_state.hh
author terom
Sat, 08 Nov 2008 20:34:14 +0000
changeset 22 b70d30e1b0fe
parent 1 085631252347
permissions -rw-r--r--
all the network code is now there, although it doesn't quite work
#ifndef GAME_STATE_HH
#define GAME_STATE_HH

#include "Player.hh"

class game_state {
public:
	game_state() : cave_width(640), cave_height(480), cave(640*480) {
		for(int i = 0; i < 60000; i++) {
			int x = i%300;
			int y = i/300;
			cave[x+100+(y+100)*640] = 1;
		}
	}
	void addPlayer(Player p) {
		players.push_back(p);
	}

	std::vector<int> cave;
	int cave_width;
	int cave_height;
	std::vector<Player> players;
};

#endif