class Checkers::Ruby2D::SquareWithPiece
Attributes
piece[R]
Public Class Methods
new(opts = {})
click to toggle source
Calls superclass method
# File lib/checkers/ruby2d/square_with_piece.rb, line 11 def initialize(opts = {}) @piece = Piece.new( x: opts[:x] + Checkers::GUI::CIRCLE_TRANSLATION, y: opts[:y] + Checkers::GUI::CIRCLE_TRANSLATION, z: 1, radius: Checkers::GUI::RADIUS, piece: opts[:piece] ) super(opts.slice(:x, :y, :size, :color)) end
Public Instance Methods
remove()
click to toggle source
Calls superclass method
# File lib/checkers/ruby2d/square_with_piece.rb, line 22 def remove @piece.remove super end