Skip to content

Commit

Permalink
change parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
vagra committed Mar 26, 2023
1 parent fb7dbd4 commit c5055a4
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion battle/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
constexpr int INIT_WIDTH = 1600;
constexpr int INIT_HEIGHT = 800;

constexpr int ACTORS = 2000;
constexpr int ACTORS = 3000;
constexpr int ACTOR_TYPES = 8;
constexpr int ACTIONS = 12;
constexpr int ROW_ACTIONS = ACTIONS;
Expand Down
2 changes: 1 addition & 1 deletion dgrid/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
constexpr int INIT_WIDTH = 1600;
constexpr int INIT_HEIGHT = 800;

constexpr int ACTORS = 1000;
constexpr int ACTORS = 3000;
constexpr int ACTOR_TYPES = 4;
constexpr int ACTIONS = 1;
constexpr int ROW_ACTIONS = 1;
Expand Down
2 changes: 1 addition & 1 deletion soldier/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
constexpr int INIT_WIDTH = 1600;
constexpr int INIT_HEIGHT = 800;

constexpr int ACTORS = 1000;
constexpr int ACTORS = 3000;
constexpr int ACTOR_TYPES = 6;
constexpr int ACTIONS = 8;
constexpr int ROW_ACTIONS = 4;
Expand Down
2 changes: 1 addition & 1 deletion ugrid/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
constexpr int INIT_WIDTH = 1600;
constexpr int INIT_HEIGHT = 800;

constexpr int ACTORS = 2000;
constexpr int ACTORS = 3000;
constexpr int ACTOR_TYPES = 4;
constexpr int ACTIONS = 1;
constexpr int ROW_ACTIONS = 1;
Expand Down
4 changes: 2 additions & 2 deletions world/Sorter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ void Sorter::moveTo(Hero* hero, int row) {
int Sorter::getRow(const Hero* hero) {
const int row = narrow_cast<int>(hero->position.y / ROW_HEIGHT);

return min(ROWS - 1, row);
return max(0, min(ROWS - 1, row));
}

int Sorter::getPrevRow(const Hero* hero) {
const int row = narrow_cast<int>(hero->prev_position.y / ROW_HEIGHT);

return min(ROWS - 1, row);
return max(0, min(ROWS - 1, row));
}

void Sorter::print() {
Expand Down
4 changes: 2 additions & 2 deletions world/Sorter.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include "../common/ActorManager.h"
#include "Hero.h"

constexpr int ROW_HEIGHT = 20;
constexpr int ROWS = 60;
constexpr int ROW_HEIGHT = 10;
constexpr int ROWS = 120;

class Hero;

Expand Down
2 changes: 1 addition & 1 deletion world/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
constexpr int INIT_WIDTH = 1600;
constexpr int INIT_HEIGHT = 800;

constexpr int ACTORS = 5000;
constexpr int ACTORS = 3000;
constexpr int ACTOR_TYPES = 17;
constexpr int ACTIONS = 3;
constexpr int ROW_ACTIONS = 3;
Expand Down

0 comments on commit c5055a4

Please sign in to comment.