Class: Mastermind::Game::Turn

Inherits:
Object
  • Object
show all
Defined in:
lib/mastermind/game/turn.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(guess:, number:, exact: 0, partial: 0) ⇒ Turn

Returns a new instance of Turn.



6
7
8
9
10
11
# File 'lib/mastermind/game/turn.rb', line 6

def initialize(guess:, number:, exact: 0, partial: 0)
  @guess = guess
  @exact = exact
  @partial = partial
  @number = number
end

Instance Attribute Details

#exactObject (readonly)

Returns the value of attribute exact.



4
5
6
# File 'lib/mastermind/game/turn.rb', line 4

def exact
  @exact
end

#guessObject (readonly)

Returns the value of attribute guess.



4
5
6
# File 'lib/mastermind/game/turn.rb', line 4

def guess
  @guess
end

#numberObject (readonly)

Returns the value of attribute number.



4
5
6
# File 'lib/mastermind/game/turn.rb', line 4

def number
  @number
end

#partialObject (readonly)

Returns the value of attribute partial.



4
5
6
# File 'lib/mastermind/game/turn.rb', line 4

def partial
  @partial
end