Timeline for Cheat at Rock-Paper-Scissors-Lizard-Spock
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 31, 2019 at 21:25 | history | edited | 79037662 | CC BY-SA 4.0 |
added 1 character in body
|
Oct 31, 2019 at 15:00 | history | edited | 79037662 | CC BY-SA 4.0 |
added 7 characters in body
|
Oct 31, 2019 at 14:57 | comment | added | IMP1 |
No worries. Ruby often has multiple methods that do the same thing (like .size and .length ), so it's worth looking to see if there's one that's a few characters shorter.
|
|
Oct 31, 2019 at 14:55 | comment | added | 79037662 | @IMP1 Thanks for the tips, still new to Ruby. | |
Oct 31, 2019 at 14:55 | comment | added | IMP1 |
Also, have a look at this. You can use %w(Lizard Rock Paper) instead of ["Lizard","Rock","Paper"]
|
|
Oct 31, 2019 at 14:53 | comment | added | IMP1 |
Why not .size instead of .length ?
|
|
Oct 31, 2019 at 14:26 | history | answered | 79037662 | CC BY-SA 4.0 |