stylistic

This commit is contained in:
joaquintides
2017-11-04 13:08:36 +01:00
parent 39794695bc
commit 00848ec1c8
8 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ int main()
// populate c
std::mt19937 gen{92748}; // some arbitrary random seed
std::discrete_distribution<> rnd({1,1,1});
std::discrete_distribution<> rnd{{1,1,1}};
for(int i=0;i<8;++i){ // assign each type with 1/3 probability
switch(rnd(gen)){
case 0: c.insert(warrior{i});break;
+1 -1
View File
@@ -43,7 +43,7 @@ int main()
//[basic_any_3
// populate with sprites
std::mt19937 gen{92748}; // some arbitrary random seed
std::discrete_distribution<> rnd({1,1,1});
std::discrete_distribution<> rnd{{1,1,1}};
for(int i=0;i<4;++i){ // assign each type with 1/3 probability
switch(rnd(gen)){
case 0: c.insert(warrior{i});break;
+1 -1
View File
@@ -22,7 +22,7 @@ int main()
boost::base_collection<sprite> c;
std::mt19937 gen{92748}; // some arbitrary random seed
std::discrete_distribution<> rnd({1,1,1});
std::discrete_distribution<> rnd{{1,1,1}};
for(int i=0;i<8;++i){ // assign each type with 1/3 probability
switch(rnd(gen)){
case 0: c.insert(warrior{i});break;
+1 -1
View File
@@ -25,7 +25,7 @@ int main()
// populate sprs
std::mt19937 gen{92748}; // some arbitrary random seed
std::discrete_distribution<> rnd({1,1,1});
std::discrete_distribution<> rnd{{1,1,1}};
for(int i=0;i<4;++i){ // assign each type with 1/3 probability
switch(rnd(gen)){
case 0: sprs.push_back(std::make_unique<warrior>(i));;break;
+1 -1
View File
@@ -21,7 +21,7 @@ int main()
// populate c
std::mt19937 gen{92748}; // some arbitrary random seed
std::discrete_distribution<> rnd({1,1,1});
std::discrete_distribution<> rnd{{1,1,1}};
for(int i=0;i<8;++i){ // assign each type with 1/3 probability
switch(rnd(gen)){
case 0: c.insert(warrior{i});break;
+1 -1
View File
@@ -21,7 +21,7 @@ int main()
// populate c
std::mt19937 gen{92748}; // some arbitrary random seed
std::discrete_distribution<> rnd({1,1,1});
std::discrete_distribution<> rnd{{1,1,1}};
for(int i=0;i<8;++i){ // assign each type with 1/3 probability
switch(rnd(gen)){
case 0: c.insert(warrior{i});break;
+1 -1
View File
@@ -22,7 +22,7 @@
//[rolegame_1
struct sprite
{
sprite(int id):id(id){}
sprite(int id):id{id}{}
virtual ~sprite()=default;
virtual void render(std::ostream& os)const=0;
+1 -1
View File
@@ -39,7 +39,7 @@ int main()
auto make_sprite=[]()->std::unique_ptr<sprite>{
//->
static std::mt19937 gen{92748};
static std::discrete_distribution<> rnd({1,1,1});
static std::discrete_distribution<> rnd{{1,1,1}};
static int id=0;
switch(rnd(gen)){