-
This message is only viewable with Universe Sandbox Galaxy Edition. Access it and much more with promo-code '53071'.
-
Want to know a failure? Mudkipz. :P
-
This message is only viewable with Universe Sandbox Galaxy Edition. Access it and much more with promo-code '53073'.
-
Ahhhhhhhhhhhhh
else //AI turns.
{
Map.cSetter = Nat[Turn-1].NatColor;
boolean search = true;
while (search = true) //The loop ensures that the claimed zone is empty. The code inside picks the zone.
{
//Chooses a random empty zone adjacent to the zones already owned by the nation.
for (;;)
{
Map.yZone = (int)(Math.random()*Map.sqrtZoneNumber);
Map.xZone = (int)(Math.random()*Map.sqrtZoneNumber);
int i = 5*Map.yZone + Map.xZone;
if (i==0) //Upper left corner zone.
{
if (Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber)
{
search = false;
}
}
else
{
if (i==Map.sqrtZoneNumber-1) //Upper right corner zone.
{
if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber)
{
search = false;
}
}
else
{
if (i==Map.ZoneNumber-Map.sqrtZoneNumber-1) //Lower left corner zone.
{
if (Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber)
{
search = false;
}
}
else
{
if (i==Map.ZoneNumber-1) //Lower right corner zone.
{
if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber)
{
search = false;
}
}
else
{
if (i<Map.sqrtZoneNumber) //Top row zones (except corners).
{
if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber)
{
search = false;
}
}
else
{
if (Map.sqrtZoneNumber%i == 0) //Left column zones (except corners).
{
if (Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber)
{
search = false;
}
}
else
{
if (i>=Map.ZoneNumber-Map.sqrtZoneNumber) //Bottom row zones (except corners).
{
if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber)
{
search = false;
}
}
else
{
if (Map.sqrtZoneNumber%i == 4) //Right column zones (except corners).
{
if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber)
{
search = false;
}
}
else
{
if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber)
{
search = false;
}}}}}}}}}
}
}
Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].claim(Nat[Turn-1]); //Claims the zone.
}
Don't worry, I will make it work... :P
Edit: Don.
else //AI turns.
{
search:for (;;) //The loop ensures that the claimed zone is empty. The code inside picks the zone.
{
//Chooses a random empty zone adjacent to the zones already owned by the nation... Sometimes.
Map.yZone = (int)(Math.random()*Map.sqrtZoneNumber);
Map.xZone = (int)(Math.random()*Map.sqrtZoneNumber);
int i = Map.sqrtZoneNumber*Map.yZone + Map.xZone;
if (i==0) {if (Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber) {break search;}} //Upper left corner zone.
else {if (i==Map.sqrtZoneNumber-1) {if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber) {break search;}} //Upper right corner zone.
else {if (i==Map.ZoneNumber-Map.sqrtZoneNumber-1) {if (Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber) {break search;}} //Lower left corner zone.
else {if (i==Map.ZoneNumber-1) {if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber) {break search;}} //Lower right corner zone.
else {if (i<Map.sqrtZoneNumber) {if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber) {break search;}} //Top row zones (except corners).
else {if (Map.sqrtZoneNumber%i == 0) {if (Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber) {break search;}} //Left column zones (except corners).
else {if (i>=Map.ZoneNumber-Map.sqrtZoneNumber) {if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber) {break search;}} //Bottom row zones (except corners).
else {if (Map.sqrtZoneNumber%i == 4) {if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber) {break search;}}//Right column zones (except corners).
else {if (Map.z[i-1].Owner == Nat[Turn-1] || Map.z[i+1].Owner == Nat[Turn-1] || Map.z[i-Map.sqrtZoneNumber].Owner == Nat[Turn-1] || Map.z[i+Map.sqrtZoneNumber].Owner == Nat[Turn-1] && Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].Owner != null && Map.ClaimedZones<Map.ZoneNumber) {break search;}}}}}}}}} //Middle zones.
}
Map.z[Map.yZone*Map.sqrtZoneNumber+Map.xZone].claim(Nat[Turn-1]); //Claims the zone.
}
-
Edit: Don.
-
HEY, it was meant to have a missing e! Nawt fail!
Formerly NeutronStar | FORRRREEEEVVVVEEEERR
-
How is that a fail?
-
You misspellwd forever.
-
Well, you misspelled "misspelled" and "not". :P
-
You misspelled misspilled!
-
yeah, i just remembered that i thought ftw (for the win) was wft, but backwards. That was fail.
-
yeah, i just remembered that i thought ftw (for the win) was wft, but backwards. That was fail.
lol so did I!
I'm also assuming "wft" -> "wtf"
-
Nerptun 8 plant frm suhn
-
septuhn r 7 plasopwetkikohjl{"Sglhlpjlgphl pjh frm ssudn
-
remember when i had sex with gibberish
-
juptur 5 plant
-
Here's a childhood fail. When I was little, I would sing "'Tis the Season Jooby-Jolly."
-
once upon a time, i died.
-
once there was an ugly barnacle
he was so ugly that everyone died
~the end~
-
eart 3th plan frm d son
-
i didn't do any schoolwork and so i quietly got removed from my school without being notified
-
rip
i like how this thread starts off with every sentence capitalized but it suddenly becomes lowercase
-
i like cheese because cheese is tasty because cheese is yum yums tasties.
this is due to the fact that cheese is yums yums tasties with a mix of yummy
-
i wrote code for my job and we're not gonna use it because we decided to go in a completely different direction. i still got paid though
-
Here's a fail: my sophomore year.
-
This message is only viewable with Universe Sandbox Galaxy Edition. Access it and much more with promo-code '178809'.
-
a slightly smaller fail: it took me over a minute to gather up the energy to wash the dishes
-
This message is only viewable with Universe Sandbox Galaxy Edition. Access it and much more with promo-code '178811'.
-
but you did them :-*
-
a slightly smaller fail
-
not a fail at all! :)
a succeed