Anonymous user
Rock-paper-scissors: Difference between revisions
→{{header|Aime}}
Line 185:
computer_play(record plays, record beats)
{
integer a, c, total;
text s;
total =
a = drand(total - 1);
break;
}
a -=
}
}
Line 210 ⟶ 208:
text s;
computer = human = 0;
while (1) {
o_text("Your choice [rock/paper/scissors]:\n");
if
break;
}
if (!
o_text("Invalid choice, try again\n");
} else {
Line 238 ⟶ 235:
o_form("Human: ~, Computer: ~\n", s, c);
if
o_text("Draw\n");
} elif
computer += 1;
o_text("Computer wins\n");
Line 248 ⟶ 245:
}
o_form("Score: Human: ~, Computer: ~\n", human, computer);
|