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