On a semi-unrelated note, my Dev-C++ 4.9.9.2 has been randomly freezing recently, so that I have to kill the process. Any help with that?
It has been a very long time, but I think WxDev-C++ fixed the issue.
On the source side of things:
Code:
unarmed.attack1maxhit=2;
unarmed.attack2maxhit=3;
unarmed.attack3maxhit=3;
unarmed.attackname1="Chop";
unarmed.attackname2="Punch";
unarmed.attackname3="Kick";
unarmed.weaponname="Unarmed";
unarmed.defensebonus=2;
is the same as:
Code:
weapons unarmed = {2, 3, 3, "Chop", "Punch", "Kick", "Unarmed", 2};
and
Code:
playerweapon.attack1maxhit=unarmed.attack1maxhit;
playerweapon.attack2maxhit=unarmed.attack2maxhit;
playerweapon.attack3maxhit=unarmed.attack3maxhit;
playerweapon.defensebonus=unarmed.defensebonus;
playerweapon.weaponname=unarmed.weaponname;
playerweapon.attackname1=unarmed.attackname1;
playerweapon.attackname2=unarmed.attackname2;
playerweapon.attackname3=unarmed.attackname3;
is the same as:
Code:
playerweapon = unarmed;
and
Code:
switch(Player.choice)
{
case 1:
{
playerweapon = unarmed;
}
break;
}
switch(opp.choice)
{
case 1:
{
oppweapon = unarmed;
}
break;
}
is the same as
Code:
void go(int choice, weapons & cw)
{
switch(choice)
{
case 1:
{
cw = unarmed;
}
break;
}
}
//...
go(Player.choice, playerweapon);
go(opp.choice, oppweapon);
Soma