File: PlayerAttributes.h

package info (click to toggle)
minetestmapper 20241111-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 300 kB
  • sloc: cpp: 2,635; python: 143; sh: 68; ansic: 30; makefile: 9
file content (26 lines) | stat: -rw-r--r-- 429 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include <list>
#include <string>

struct Player
{
	std::string name;
	float x, y, z;
};

class PlayerAttributes
{
public:
	typedef std::list<Player> Players;

	PlayerAttributes(const std::string &worldDir);
	Players::const_iterator begin() const;
	Players::const_iterator end() const;

private:
	void readFiles(const std::string &playersPath);
	void readSqlite(const std::string &db_name);

	Players m_players;
};