From 1aee1f51cd6a56d4c29bdb836744fb1c03697e01 Mon Sep 17 00:00:00 2001 From: roca Date: Sun, 10 Mar 2013 20:28:57 -0400 Subject: [PATCH] Enhancement #3 --- ruby/hw6assignment.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby/hw6assignment.rb b/ruby/hw6assignment.rb index 3b81b66..d5cb935 100644 --- a/ruby/hw6assignment.rb +++ b/ruby/hw6assignment.rb @@ -59,13 +59,13 @@ class MyPiece < Piece # class method to choose the next piece def self.next_piece (board,cheat=nil) square = [[[0, 0], [0, 0], [0, 0], [0,0]]] - cheat ? MyPiece.new(square, board) : MyPiece.new(All_Pieces.sample, board) + cheat ? MyPiece.new(square, board) : MyPiece.new(All_My_Pieces.sample, board) end # class array holding all the pieces and their rotations - All_Pieces = [ + All_My_Pieces = [ [[[0, 0], [1, 0], [0, 1], [1, 1]]], # square (only needs one) rotations([[0, 0], [-1, 0], [1, 0], [0, -1]]), # T @@ -84,7 +84,7 @@ def self.next_piece (board,cheat=nil) ] # your enhancements here def self.piecies - All_Pieces + All_My_Pieces end end