Class: Baron::Action::CompanyAction

Inherits:
Baron::Action show all
Defined in:
lib/baron/action/company_action.rb

Overview

A company action is an action taken by a director on behalf of a company

Direct Known Subclasses

BuyTrain, Done, Payout, PlaceTile, PlaceToken, Retain, RunTrains

Instance Attribute Summary collapse

Attributes inherited from Baron::Action

#player

Instance Method Summary collapse

Methods inherited from Baron::Action

#process, #symbol

Constructor Details

#initialize(turn) ⇒ CompanyAction

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Create the company action

This is designed to be called by the parent action

Parameters:

  • turn (Baron::Turn)

    The turn this action is a part of


21
22
23
24
# File 'lib/baron/action/company_action.rb', line 21

def initialize(turn)
  @player = turn.player
  @turn = turn
end

Instance Attribute Details

#turnBaron::Turn (readonly)

The turn that this action is a part of

Examples:

action.turn

Returns:


13
14
15
# File 'lib/baron/action/company_action.rb', line 13

def turn
  @turn
end