Browse Source

move location of built-in layouts

dev
Andy Meneely 8 years ago
parent
commit
3b5fdfaf61
  1. 22
      docs/layouts.rst
  2. 0
      lib/squib/builtin/layouts/economy.yml
  3. 0
      lib/squib/builtin/layouts/fantasy.yml
  4. 0
      lib/squib/builtin/layouts/hand.yml
  5. 0
      lib/squib/builtin/layouts/playing-card.yml
  6. 0
      lib/squib/builtin/layouts/tuck_box.yml
  7. 2
      lib/squib/layout_parser.rb

22
docs/layouts.rst

@ -225,11 +225,14 @@ Squib Comes with Built-In Layouts
Why mess with x-y coordinates when you're first prototyping your game? Just use a built-in layout to get your game to the table as quickly as possible.
If your layout file is not found in the current directory, Squib will search for its own set of layout files. The latest the development version of these can be found `on GitHub <https://github.com/andymeneely/squib/tree/master/lib/squib/layouts>`_.
If your layout file is not found in the current directory, Squib will search for its own set of layout files. The latest the development version of these can be found `on GitHub <https://github.com/andymeneely/squib/tree/master/lib/squib/builtin/layouts>`_.
Contributions in this area are particularly welcome!!
The following depictions of the layouts are generated with `this script <https://github.com/andymeneely/squib/tree/master/samples/layouts/builtin_layouts.rb>`_
The following depictions of the layouts are generated with this script:
.. literalinclude:: ../samples/layouts/builtin_layouts.rb
:linenos:
fantasy.yml
~~~~~~~~~~~
@ -287,6 +290,17 @@ https://github.com/andymeneely/squib/tree/master/lib/squib/layouts/playing_card.
See Layouts in Action
---------------------
`This sample <https://github.com/andymeneely/squib/tree/master/samples/>`_ demonstrates many different ways of using and combining layouts.
This sample, `which lives here <https://github.com/andymeneely/squib/tree/master/samples/layouts/layouts.rb>`_, demonstrates many different ways of using and combining layouts.
.. literalinclude:: ../samples/layouts/layouts.rb
:linenos:
This is ``custom-layout.yml``:
.. literalinclude:: ../samples/layouts/custom-layout.yml
:linenos:
This is ``custom-layout2.yml``:
`This sample <https://github.com/andymeneely/squib/tree/master/samples/>`_ demonstrates built-in layouts based on popular games (e.g. ``fantasy.yml`` and ``economy.yml``)
.. literalinclude:: ../samples/layouts/custom-layout2.yml
:linenos:

0
lib/squib/layouts/economy.yml → lib/squib/builtin/layouts/economy.yml

0
lib/squib/layouts/fantasy.yml → lib/squib/builtin/layouts/fantasy.yml

0
lib/squib/layouts/hand.yml → lib/squib/builtin/layouts/hand.yml

0
lib/squib/layouts/playing-card.yml → lib/squib/builtin/layouts/playing-card.yml

0
lib/squib/layouts/tuck_box.yml → lib/squib/builtin/layouts/tuck_box.yml

2
lib/squib/layout_parser.rb

@ -34,7 +34,7 @@ module Squib
# Determine the file path of the built-in layout file
def builtin(file)
"#{File.dirname(__FILE__)}/layouts/#{file}"
"#{File.dirname(__FILE__)}/builtin/layouts/#{file}"
end
# Process the extends recursively

Loading…
Cancel
Save