• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
-Kobas-
Reaction score
501

Profile posts Latest activity Postings Experience Albums Resources About Medals

  • Hello there, -Kobas- guy! So I was thinking, that you rejected Pony's map. You may have said it had trees blocking. And you just gave a straight head 1/5. And yes, I haven't checked the map yet, but terrain seems nice. And we are complaining a little.
    Now that's bad-ass, now I feel I too want to make a tool lol but nah I'll use yours :)
    -Kobas-, how did you make that awesome moderation system? I'm curious, if it's a tool, can you make it mobile? So we mobile users can use it too for reviewing [of course, some modification since I see some field are for 'moderators only']
    That's cool, so probably when its done we can now purge the map section together :D
    Oh I think I forgot to add more reply in your message :p

    Yeah sure just don't rush your importance especially school work, The map section is still in good shape so no worries.
    hey Kobas, would you be so kind as to review my map? i uploaded it a while ago with improper quality and description but its fixed now and in the pending section. I do realize you are busy so i'll understand if it will take a while. Thanks in advance.
    This is exactly what I had in mind, but I didn't find the icon with a quick look, so I skipped it. Maybe the next one, if I use the same template in the future :)

    Thanks by the way!
    -Kobas- I updated my map now, just added some doodads to make it look less empty and no plans in making ground levels to decrease flat-looking view though :)
    manje vise to da li te zanima, mozes li da je approve? :D to cekam da mogu ostali da je vide, da dobijem kritike,komentare itd :p :D
    Thanks but I'm not done yet with the remaining maps, I'll leave mine so you can start with a smaller scale of pending/s :)
    Kobii-chan! I'll probably leave this site for 2 days(just want to cool off on some stuff) I'll leave the pending section with my map on it but if there would be incoming map pending could you take over? I'll be doing all of my things for today and tomorrow I'm gone :)
    No you did not D:

    #include <string>
    #include <exception>
    #include <utility>
    #include <algorithm>
    #include <vector>

    namespace {
    int generate_user_id() {
    static int counter = 0;
    return ++counter;
    }
    }

    class User {
    private:
    int m_id;
    std::string m_name;

    public:
    User(const std::string& p_name = "") noexcept : m_name(p_name), m_id(generate_user_id()) {}
    User(const User& rhs) noexcept : m_name(rhs.m_name), m_id(rhs.m_id) {}

    User& operator =(const User& rhs) noexcept
    {
    this->m_name = rhs.m_name;
    this->m_id = rhs.m_id;
    return *this;
    }

    virtual ~User() noexcept {}

    inline const bool operator ==(const User& rhs) const noexcept { return this->m_id == rhs.m_id; }
    inline const bool operator !=(const User& rhs) const noexcept { return this->m_id != rhs.m_id; }
    inline const int get_id() const noexcept { return m_id; }
    inline const std::string& get_name() const noexcept { return m_name; }
    };

    class UserDatabase {
    private:
    std::vector<User> user_list;

    public:
    UserDatabase() noexcept {}

    UserDatabase(const UserDatabase& rhs) noexcept
    {
    for (auto node = rhs.user_list.begin(); node != rhs.user_list.end(); ++node)
    {
    user_list.push_back(*node);
    }
    }

    UserDatabase& operator =(const UserDatabase& rhs) noexcept
    {
    user_list.clear();

    for (auto node = rhs.user_list.begin(); node != rhs.user_list.end(); ++node)
    {
    user_list.push_back(*node);
    }

    return *this;
    }

    virtual ~UserDatabase() noexcept {}

    inline void add_user(const User& user) noexcept { user_list.push_back(user); }
    inline void add_user(const User* const user) noexcept { user_list.push_back(*user); }
    inline const int user_count() const noexcept { return user_list.size(); }

    const User& get_user(int u_id) const
    {
    for (auto node = user_list.begin(); node != user_list.end(); ++node)
    {
    if (u_id == node->get_id())
    {
    return *node;
    }
    }

    throw std::runtime_error("User Not Found (" + std::to_string(u_id) + ")");
    }

    const User& get_user(const std::string& u_name) const
    {
    for (auto node = user_list.begin(); node != user_list.end(); ++node)
    {
    if (u_name == node->get_name())
    {
    return *node;
    }
    }

    throw std::runtime_error("User Not Found (" + u_name + ")");
    }

    void remove_user(const User& which_user) noexcept
    {
    auto node = std::find(user_list.begin(), user_list.end(), which_user);

    if (node != user_list.end())
    {
    user_list.erase(node);
    }
    }
    };

    This is how you should've done it ;_;
    This code is almost flawless in terms of standard C++11 shit :D
    The only things it lacks are move constructors for the class but you don't really need those here anyway.

    Usage example:

    int main() {
    UserDatabase database;

    database.add_user(new User("Magtheridon96"));
    database.add_user(new User("-Kobas-"));
    database.add_user(new User("Geries"));

    database.add_user(new User("Kelly"));
    database.add_user(new User("Kellypoo"));

    std::cout << "User count is " << database.user_count() << std::endl;

    try
    {
    std::cout << "User id of -Kobas- is " << database.get_user("-Kobas-").get_id() << std::endl;
    std::cout << "User id of Magtheridon96 is " << database.get_user("Magtheridon96").get_id() << std::endl;
    std::cout << "User id of Ralle is " << database.get_user("Ralle").get_id() << std::endl;
    }
    catch (const std::exception& e)
    {
    std::cout << e.what() << std::endl;
    }

    return 0;
    }

    And it actually works.
    I happen to know you're really good at unprotecting maps. I had a issue with my map and accidentally protected it without making a unprotected copy. If I send you the map could you unprotect it? I can also easily prove that it is my map and not someone elses.
    Upravo sam sebi zadao epic quest za ovu 2013, da popravim sve ocene do kraja godine i da dobijem dc mapu, model i pack :p.
    Nice to hear that, good luck :)
    Waiting if you going to release it at Hive :D
    I remember or discussion about your game and got a good name for it, how bout Rise of the Great Empire?
    I see, older version of Microsoft.... hmm..... I might try it, I want to make some simple game too.....

    EDIT :
    When you're done with the game, what will you do with it? Publish it?
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top