class Rpsdz::Computer
Public Class Methods
new(name = "Computer")
click to toggle source
why does this constructor need to have an argument
# File lib/computer.rb, line 6 def initialize(name = "Computer") @name = name @hand = Hand.new(randomize) end
Public Instance Methods
randomize()
click to toggle source
# File lib/computer.rb, line 11 def randomize @hand = Hand.random end