/nested_arrays.rb Secret
Created
August 31, 2014 09:08
-
Star
(0)
You must be signed in to star a gist -
Fork
(154)
You must be signed in to fork a gist
-
-
Save nextacademy-private/5505d24b7496a1e0e83f to your computer and use it in GitHub Desktop.
Nested Arrays
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Objective 2: Chessboard | |
# Objective 3: Data table | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chessboard = []
chessboard << ["wr","wk","wb","wq","wk","wb","wk","wr"]
chessboard << ["wp","wp","wp","wp","wp","wp","wp","wp"]
chessboard << ["","","","","","","","",]
chessboard << ["","","","","","","","",]
chessboard << ["","","","","","","","",]
chessboard << ["","","","","","","","",]
chessboard << ["bp","bp","bp","bp","bp","bp","bp","bp"]
chessboard << ["br","bk","bb","bq","bk","bb","bk","br"]
p chessboard[0][0]
data_array = []
data_array = [ [ "Number","Name,Position","Points per Game" ],
[ "12","Joe Schmo","Center",[14,32,7,0,23] ],
[ "9","Ms. Buckets","Point Guard",[19,0,11,22,0] ],
[ "31","Harvey Kay","Shooting Guard",[0,30,16,0,25] ],
[ "18","Sally Talls","Power Forward",[18,29,26,31,19] ],
[ "22","MK DiBoux","Small Forward",[11,0,23,17,0] ], ]
p data_array[3][3]