Module: Sashite::Cpn

Defined in:
lib/sashite/cpn.rb,
lib/sashite/cpn/turn.rb,
lib/sashite/cpn/shape.rb,
lib/sashite/cpn/position.rb,
lib/sashite/cpn/pieces_in_hand.rb

Overview

Namespace for the library.

Defined Under Namespace

Classes: Generate, LengthError, PiecesInHand, Position, Shape, Turn

Class Method Summary collapse

Class Method Details

.generate(bool, indexes, squares, pieces) ⇒ Object

Generate the CPN.

Parameters:

  • bool (Boolean)

    The turn to play.

  • indexes (Array)

    The shape of the board.

  • squares (Array)

    The board structure.

  • pieces (Array)

    The list of pieces in hand.



11
12
13
# File 'lib/sashite/cpn.rb', line 11

def self.generate(bool, indexes, squares, pieces)
  Generate.new(bool, indexes, squares, pieces).to_s
end