docs: cleanup and warning fixes

This commit is contained in:
Andy Meneely
2017-01-04 15:31:29 -05:00
parent 1cdc9c0d71
commit f4a9a668c2
8 changed files with 46 additions and 26 deletions
@@ -82,7 +82,9 @@ Executing Ruby is usually done through the command line. Depending on your oper
* On Windows, there's the Command Prompt (Windows Key, `cmd`). It's a little janky, but it'll do. I've developed Squib primarily in Windows using the Command Prompt.
* If you're on Linux/BSD/etc, you undoubtedly know what the command line is.
For example::
For example:
.. code-block:: none
$ cd c:\game-prototypes
$ gem install squib
@@ -19,7 +19,9 @@ But! We also want to get the *second* (and third and fourth and fifth...) versio
Get Installed and Set Up
-----------------------------
The ordinary installation is like most Ruby gems::
The ordinary installation is like most Ruby gems:
.. code-block:: none
$ gem install squib
@@ -31,7 +33,9 @@ Our Idea: Familiar Fights
-------------------------
Let's start with an idea for a game: Familiar Fights. Let's say we want to have players fight each other based on collecting cards that represent their familiars, each with different abilities. We'll have two factions: drones and humans. Each card will have some artwork in it, and some text describing their powers.
First thing: the title. It stinks, I know. It's gonna change. So instead of naming the directory after our game and getting married to our bad idea, let's give our game a code name. I like to use animal names, so let's go with Arctic Lemming::
First thing: the title. It stinks, I know. It's gonna change. So instead of naming the directory after our game and getting married to our bad idea, let's give our game a code name. I like to use animal names, so let's go with Arctic Lemming:
.. code-block:: none
$ squib new arctic-lemming
$ cd arctic-lemming
@@ -139,7 +143,9 @@ So technically, these two lines are equivalent::
Ok back to the game. We COULD just put our data into literal arrays. But that's considered bad programming practice (called *hardcoding*, where you put data directly into your code). Instead, let's make use of our CSV data file.
What the ``csv`` command does here is read in our file and create a hash of arrays. Each array is a column in the table, and the header to the colum is the key to the hash. To see this in action, check it out on Ruby's interactive shell (``irb``)::
What the ``csv`` command does here is read in our file and create a hash of arrays. Each array is a column in the table, and the header to the colum is the key to the hash. To see this in action, check it out on Ruby's interactive shell (``irb``):
.. code-block:: none
$ irb
2.1.2 :001 > require 'squib'