Skip to content

Instantly share code, notes, and snippets.

View iftheshoefritz's full-sized avatar

Fritz Meissner iftheshoefritz

  • Cape Town, South Africa
View GitHub Profile
FROM ruby:2.5.5-alpine as base
# Configure the main working directory. This is the base
# directory used in any further RUN, COPY, and ENTRYPOINT
# commands.
WORKDIR /app
RUN apk update && apk add --no-cache --virtual .run-deps \
bash \
python \
# frozen_string_literal: true
require 'pubbit'
module Publisher
class Exchange
def self.publish(event)
new('school_api.updates').publish(event)
end
# frozen_string_literal: true
require 'pubbit'
module Publisher
class Exchange
def self.publish(event)
new('school_api.updates').publish(event)
end
class GameState
attr_accessor :matrix
def initialize(matrix)
@matrix = deep_dup(matrix)
@next_step = deep_dup(matrix)
end
def [](y)
@matrix[y]