Class: Baron::Action::SelectCertificate

Inherits:
BuyCertificate show all
Defined in:
lib/baron/action/select_certificate.rb

Overview

This action allows the player to select a certificate that they are permitted to purchase.

Instance Attribute Summary

Attributes inherited from BuyCertificate

#certificate

Attributes inherited from Baron::Action

#player

Instance Method Summary collapse

Methods inherited from BuyCertificate

#create_transaction

Methods inherited from Baron::Action

#process, #symbol

Constructor Details

#initialize(game, player, certificate, par_price = nil) ⇒ SelectCertificate

Create the action where the player is selecting the certificate

chosen to purchase. that this person has selected.

Examples:

Baron::Action::SelectCertificate.new(
  player,
  certificate
)

Parameters:


21
22
23
24
25
26
27
28
29
# File 'lib/baron/action/select_certificate.rb', line 21

def initialize(game, player, certificate, par_price = nil)
  @initial_offering = game.initial_offering
  super(player, @initial_offering, certificate)
  @initial_offering.set_par_price(
    certificate.company,
    par_price
  ) if par_price
  create_transaction
end