class AdventOfCode2021::Day21::Player

Defined in:

day21/day21.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(position : Int32, score : Int32 = 0, wins : Int64 = 0_i64) #

[View source]

Instance Method Detail

def clone : Player #

[View source]
def do_turn(dice : Dice) : Int32 #

[View source]
def do_turn(roll : Int32, counter = 1, win_points = 1000) : Int32 #

[View source]
def position : Int32 #

[View source]
def position=(position : Int32) #

[View source]
def score : Int32 #

[View source]
def score=(score : Int32) #

[View source]
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>

[View source]
def wins : Int64 #

[View source]
def wins=(wins : Int64) #

[View source]
def wins?(win_points = 1000) #

[View source]