class AdventOfCode2021::Day21::Player
- AdventOfCode2021::Day21::Player
- Reference
- Object
Defined in:
day21/day21.crConstructors
Instance Method Summary
- #clone : Player
- #do_turn(dice : Dice) : Int32
- #do_turn(roll : Int32, counter = 1, win_points = 1000) : Int32
- #position : Int32
- #position=(position : Int32)
- #score : Int32
- #score=(score : Int32)
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
- #wins : Int64
- #wins=(wins : Int64)
- #wins?(win_points = 1000)
Constructor Detail
Instance Method Detail
def to_s(io : IO)
#
Description copied from class Reference
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>