Skip to content

Commit

Permalink
minor fixes, quitando prints innecesarios y funciones innecesarias.
Browse files Browse the repository at this point in the history
  • Loading branch information
nrsanchezfiuba committed Jun 25, 2024
1 parent 77ac104 commit 10c02e1
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
2 changes: 0 additions & 2 deletions client/menu_objects/match_selector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ void MatchSelector::on_click() {
#ifdef LOG
std::cout << "Clicked Join match." << std::endl;
#endif
std::cout << "match button id: " << id_match << std::endl;
selected_id = id_match;
std::cout << "selected id: " << selected_id << std::endl;
is_joinning.store(true);
caracter_select_running.store(true);
match_select_running.store(false);
Expand Down
7 changes: 0 additions & 7 deletions client/protocol/client_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ void ClientReceiver::run() {
try {
while (_keep_running) {
std::shared_ptr<Message> message = client_protocol.recv_message();
if (message->get_header() == CLOSE_CONNECTION) {
std::cout << "about to push close connection" << std::endl;
queue.push(message);
}
_keep_running = !client_protocol.is_closed();
if (!_keep_running) {
std::cout << "KEEP RUNNING CLOSE" << std::endl;
}
if (_keep_running) {
queue.push(message);
}
Expand Down
1 change: 0 additions & 1 deletion client/scenes/match_select_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ void MatchSelectScene::create_match_buttons(const std::shared_ptr<MatchInfoDTO>&
map_str + " - Players: " + std::to_string(dto->active_games[i].players_ingame) +
"/" + std::to_string(dto->active_games[i].players_max);
uint16_t id = dto->active_games[i].match_id;
std::cout << "id: " << id << std::endl;
selectors.emplace_back(renderer, resource_pool, x_start, y_start, match_select_running,
character_select_running, is_joinning, label_info, id, selected_id);
selectors.back().center_x(0, 800);
Expand Down
14 changes: 1 addition & 13 deletions server/protocol/server_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ ServerReceiver::ServerReceiver(ServerProtocol& protocol, Queue<std::shared_ptr<M

bool ServerReceiver::is_dead() { return _keep_running; }

void ServerReceiver::stop() {
_keep_running = false;
// queue->close();
}
void ServerReceiver::stop() { _keep_running = false; }

void ServerReceiver::run() {
try {
Expand All @@ -32,13 +29,4 @@ void ServerReceiver::run() {

ServerReceiver::~ServerReceiver() {}

// std::shared_ptr<Queue<std::shared_ptr<Message>>>& ServerReceiver::get_receiver_queue() {
// return queue;
// }
//
// void ServerReceiver::change_receiver_queue(
// const std::shared_ptr<Queue<std::shared_ptr<Message>>>& sharedPtr) {
// queue = sharedPtr;
// }

bool ServerReceiver::isAlive() { return _keep_running; }

0 comments on commit 10c02e1

Please sign in to comment.