<commit_before>extern crate piston;
extern crate piston_window;
extern crate graphics;
extern crate gfx_device_gl;
extern crate glutin;
extern crate serde;
extern crate serde_hjson;
#[macro_use]
extern crate unborrow;
extern crate rodio;

mod app;
pub use app::App;

mod audio_private;
pub mod audio {
    pub use audio_private::dj::Dj;
}

mod game_object;
pub use game_object::GameObject;

#[macro_use]
pub mod component;

mod texture;
pub use texture::Texture;

mod transform;
pub use transform::Transform;

mod input_private;
pub mod input {
    pub use input_private::Axis;
    pub use input_private::controller;
    pub use input_private::input::Input;
    pub use input_private::keyboard;
    pub use input_private::mouse;
    pub use input_private::Button;
}


mod camera;
pub use camera::Camera;

mod vec2;
pub use vec2::Vec2;

pub mod physics;<commit_msg>Add check_and_use function<commit_after>extern crate piston;
extern crate piston_window;
extern crate graphics;
extern crate gfx_device_gl;
extern crate glutin;
extern crate serde;
extern crate serde_hjson;
#[macro_use]
extern crate unborrow;
extern crate rodio;

mod app;
pub use app::App;

mod audio_private;
pub mod audio {
    pub use audio_private::dj::Dj;
}

mod game_object;
pub use game_object::GameObject;

#[macro_use]
pub mod component;

mod texture;
pub use texture::Texture;

mod transform;
pub use transform::Transform;

mod input_private;
pub mod input {
    pub use input_private::Axis;
    pub use input_private::controller;
    pub use input_private::input::Input;
    pub use input_private::keyboard;
    pub use input_private::mouse;
    pub use input_private::Button;
}


mod camera;
pub use camera::Camera;

mod vec2;
pub use vec2::Vec2;

pub mod physics;

use std::ops::SubAssign;
pub fn check_and_use<T, K>(resource: &mut T, cost: K) -> bool
where T: SubAssign<K> + PartialOrd<K>
{
    if *resource >= cost {
        *resource -= cost;
        true
    }
    else {false}
}
{'fraction_non_alphanumeric': 0.09433962264150944, 'fraction_numerical': 0.0030596634370219276, 'mean_word_length': 4.75366568914956, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2080049', 'n_tokens_mistral': 672, 'n_tokens_neox': 642, 'n_words': 216}