Skip to content

Instantly share code, notes, and snippets.

View janlindblom's full-sized avatar
🐢
I may be slow to respond.

Jan janlindblom

🐢
I may be slow to respond.
View GitHub Profile
@janlindblom
janlindblom / crashybird_kulturkarnevalen.ts
Created November 12, 2018 08:33
The "Crashy Bird" game for micro:bit, saved from kulturkarnevalen 2018.
let ticks = 0
let emptyObstacleY = 0
let bird: game.LedSprite = null
let obstacles: game.LedSprite[] = []
let index = 0
input.onButtonPressed(Button.A, function () {
bird.change(LedSpriteProperty.Y, -1)
})
input.onButtonPressed(Button.B, function () {
bird.change(LedSpriteProperty.Y, 1)

Keybase proof

I hereby claim:

  • I am janlindblom on github.
  • I am janerictobias (https://keybase.io/janerictobias) on keybase.
  • I have a public key ASBnBSwFpTol6cRhgod1fH6kaWwLOhtrR3KTICie7LsZuwo

To claim this, I am signing this object:

@janlindblom
janlindblom / cell.rb
Created September 1, 2015 22:30
A simple implementation of Game of Life in Ruby.
class Cell
attr_accessor :state
def initialize(state=:dead)
@state = state
end
# Set a new state for the cell
def step(newstate)
@state = newstate