<commit_before>//
// Created by ariel on 10/30/16.
//
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>

#include "Tower/Tower.h"
#include "Tower/TowerMan.h"


using std::cout;
using std::endl;

using Towers::Tower;
using Towers::TowerType;
using Towers::TowerMan;

using Monsters::MonsterMan;


int main () {
    sf::RenderWindow window(sf::VideoMode(640, 480, 32), "Tower Defense", sf::Style::Close);

    MonsterMan monstMan(window);
    TowerMan towerMan(window, monstMan);
    Monster m1(0.3);
    vector<Monster *> thing;
    thing.push_back(&m1);

    window.setFramerateLimit(240);
    sf::SoundBuffer sound;
    sound.loadFromFile("Resources/Sounds/TowerFireSound-1.wav");
    sf::Sound sound1;
    sound1.setBuffer(sound);
    //sound1.play();

    while (window.isOpen()) {
        sf::Event event;
        while(window.pollEvent(event)) {
            if (event.type == sf::Event::Closed) {
                cout << "received close event" << endl;
                window.close();
            } else if (event.type == sf::Event::MouseButtonReleased) {
                towerMan.createTower(TowerType::SHORT_RANGE, sf::Mouse::getPosition(window).x,
                                     sf::Mouse::getPosition(window).y);
                cout << "mouse clicked" << endl;
            }
    		}

				window.clear(sf::Color::Black);

				towerMan.update();
				towerMan.render();

				monstMan.update();
				monstMan.render();

				window.display();
		}


    return 0;
}
<commit_msg>Implemented rudimentary window scaling for high dpi displays<commit_after>//
// Created by ariel on 10/30/16.
//
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>

#include "Tower/Tower.h"
#include "Tower/TowerMan.h"


using std::cout;
using std::endl;

using Towers::Tower;
using Towers::TowerType;
using Towers::TowerMan;

using Monsters::MonsterMan;

int main () {
    // Breaks on 4:3, large screen sizes, but is an acceptable scaling solution for now
    double scale = sf::VideoMode::getDesktopMode().height / 1080;
    sf::RenderWindow window(sf::VideoMode(640 * scale, 480 * scale, 32), "Tower Defense", sf::Style::Close);

    MonsterMan monstMan(window);
    TowerMan towerMan(window, monstMan);
    Monster m1(0.3);
    vector<Monster *> thing;
    thing.push_back(&m1);

    window.setFramerateLimit(240);
    sf::SoundBuffer sound;
    sound.loadFromFile("Resources/Sounds/TowerFireSound-1.wav");
    sf::Sound sound1;
    sound1.setBuffer(sound);
    //sound1.play();

    while (window.isOpen()) {
        sf::Event event;
        while(window.pollEvent(event)) {
            if (event.type == sf::Event::Closed) {
                cout << "received close event" << endl;
                window.close();
            } else if (event.type == sf::Event::MouseButtonReleased) {
                towerMan.createTower(TowerType::SHORT_RANGE, sf::Mouse::getPosition(window).x,
                                     sf::Mouse::getPosition(window).y);
                cout << "mouse clicked" << endl;
            }
    		}

				window.clear(sf::Color::Black);

				towerMan.update();
				towerMan.render();

				monstMan.update();
				monstMan.render();

				window.display();
		}


    return 0;
}

{'fraction_non_alphanumeric': 0.14969135802469136, 'fraction_numerical': 0.017901234567901235, 'mean_word_length': 2.7686046511627906, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6089186', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1047, 'n_words': 203}