You need to sign in or sign up before continuing.
Commit a3b2cc2a authored by Chae Ho Shin's avatar Chae Ho Shin

do you know SR?

parent 185b3e23
No preview for this file type
......@@ -14,19 +14,21 @@ namespace flatland {
class Flatlandobject
{
Flatlandobject(std::vector<int> theparts, std::tuple<State, double, int> initialstate, Mainworldobserver* thegame)
Flatlandobject(std::vector<int> theparts, std::tuple<State, double, double, int, int, int> initialstate, Mainworldobserver* thegame)
{
parts = theparts;
objecthistory.push_back(initialstate);
thegame->objectlist.push_back(std::make_tuple(*this, std::get<2>(initialstate)));
thegame->objectlist.push_back(std::make_tuple(*this, std::get<3>(initialstate)));
}
public:
std::vector<int> parts = {};
std::vector<std::tuple<State, double, int>> objecthistory = {};
std::vector<std::tuple<State, double, double, int, int, int>> objecthistory = {};
// state, time(in main observer clock) at statechange, proper time clock at state change, location(in main observer coordinates) at state change,
// velocity(if inertial) relative to mainobserver, proper acceleration(if accelerating)
double propertime;
int velocity;
int properacceleration;
int currentvelocity;
int currentproperacceleration;
auto getcenterofmass() -> int
......@@ -41,6 +43,11 @@ namespace flatland {
};
class Player : public Flatlandobject
{
};
class Mainworldobserver
{
public:
......@@ -59,11 +66,12 @@ namespace flatland {
this->currenttime += tick;
for (std::tuple<Flatlandobject, int> a: this->objectlist)
{
std::get<0>(a).changestate(this->currenttime);
if (std::get<0>(std::get<0>(a).objecthistory.back()) == INERTIAL)
auto theobject = std::get<0>(a);
theobject.changestate(this->currenttime);
auto objectstate = theobject.objecthistory.back();
if (std::get<0>(objectstate) == INERTIAL)
{
auto newx = std::get<3>(objectstate) + ;
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment