Solo Ace wrote: |
one of them can't even deal with my behaviour (loads of active processes running next to eachother) |
Code: Show/Hide #include <iostream.h>
#include <string.h> |
D1st0rt wrote: |
lol its like a crusade against iostream |
Dr Brain wrote: |
AMD processors are better if you're building it yourself.
AMD processors are worse if your computer shopping. |
Dr Brain wrote: |
Let me elaborate some more. Intel processors run better than AMD processors rated at the same speed. BUT AMD processors are cheaper than Intel's. In the end, I've found that AMD does offer more bang/buck than the Intels. |
Mr Ekted wrote: |
I didn't reply cuz there was nothing wrong with what you did. ![]() Except I wouldn't store flags in a list. ![]() |
Code: Show/Hide Uint16 is_team_winning_and_which_is_it(Uint16 touching_freq) { if (touching_freq == first_flagholder) { ++lower_bound; ++upper_bound; } else { --lower_bound; } Uint16 returner = 65535; // -1 indicating a "no" response. if (lower_bound == 0 || upper_bound == flaglist->total) { if (lower_bound != flaglist->total) { reread_flags(); // Updates first_flagholder, upp/lower_bound. } // "If the first_flagholder holds all the flags..." if (lower_bound == flaglist->total) { returner = first_flag_holder; } } return returner; } void reread_flags() { if (flaglist->head) { _listnode<Flag> * reader = flaglist->head; first_flagholder = reader->item->team; reader = reader->next; lower_bound = 1; while (reader) { // Add one if the flag is owned by the first_flagholder. lower_bound += (reader->item->team == first_flagholder); reader = reader->next; } upper_bound = lower_bound; } return; } |
Mr Ekted wrote: |
Nice post. |
Mine GO BOOM wrote: |
I do my best thinking at 2AM after sleeping for 4 hours because I havn't had enough sleep during the week, and woke up in the middle of the night because I was hungry as hell. Yummy apple. |