Class: Pacman::Game::ShowView

Inherits:
Charming::View
  • Object
show all
Defined in:
app/views/game/show_view.rb

Instance Method Summary collapse

Instance Method Details

#renderObject



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/views/game/show_view.rb', line 6

def render
  return cramped_notice if board_scale.cramped?

  Charming::UI.center(
    column(
      render_component(HudComponent.new(world: world)),
      render_component(BoardComponent.new(world: world, scale: board_scale.factor)),
      gap: 1
    ),
    width: layout_screen.width,
    height: layout_screen.height
  )
end