Rock-paper-scissors: Difference between revisions

m
→‎{{header|R}}: Syntax highlighting.
mNo edit summary
m (→‎{{header|R}}: Syntax highlighting.)
Line 4,585:
=={{header|R}}==
This milks R's vectorisation quite heavily. However, this approach doesn't generalise well to the extra credit task. In particular, the last two lines of the loop would need a lot of work to be both non-ugly and working.
<lang Rrsplus>play <- function()
{
bias <- c(r = 1, p = 1, s = 1)
331

edits