Class: UI::VoltorbFlip::BoardCounter

Inherits:
SpriteStack show all
Defined in:
docs/4_Systems_900_Games.rb

Overview

Board counter sprite

Constant Summary

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary

Attributes inherited from SpriteStack

#animated, #data, #moving, #stack, #viewport, #x, #y

Instance Method Summary collapse

Methods inherited from SpriteStack

#[], #add_background, #add_line, #add_text, #anime, #anime_delta_set, #dispose, #each, #execute_anime, #move, #move_to, #opacity, #opacity=, #push, #push_sprite, #set_origin, #set_position, #simple_mouse_in?, #size, #stop_animation, #translate_mouse_coords, #update, #update_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=

Constructor Details

#initialize(viewport, index, column) ⇒ BoardCounter

Create a new board counter

Parameters:

  • viewport (Viewport)
  • index (Integer)

    index of the counter

  • column (Boolean)

    if it’s a counter in the column or in the row



239
240
# File 'docs/4_Systems_900_Games.rb', line 239

def initialize(viewport, index, column)
end

Instance Method Details

#add_tile(tile)

Add a tile

Parameters:



247
248
# File 'docs/4_Systems_900_Games.rb', line 247

def add_tile(tile)
end

#update_display

Update the counter display according to the tile values



250
251
# File 'docs/4_Systems_900_Games.rb', line 250

def update_display
end

#voltorb_countInteger

Return the count of voltorb

Returns:

  • (Integer)


243
244
# File 'docs/4_Systems_900_Games.rb', line 243

def voltorb_count
end