I hereby claim:
- I am mikemar10 on github.
- I am mikemar10 (https://keybase.io/mikemar10) on keybase.
- I have a public key ASAxswWBaiGf8O9plu77Ijf6tUxqWV9MGFD6CaCj9AfkvAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#$rom = $dragon.ffi_file.loadfile('roms/space_invaders.ch8').bytes | |
#$rom = $dragon.ffi_file.loadfile('roms/pong.ch8').bytes | |
$rom = $dragon.ffi_file.loadfile('roms/breakout.ch8').bytes | |
#$rom = $dragon.ffi_file.loadfile('roms/maze.ch8').bytes | |
class Chip8 | |
attr_accessor :game, :inputs, :outputs | |
def initialize | |
@ram = Array.new(4096, 0) |
(= title "Pong") | |
(= width 32) | |
(= height 24) | |
; macros | |
(= incr (mac (x) (list '= x (list '+ x 1)))) | |
(= decr (mac (x) (list '= x (list '- x 1)))) | |
(= negate (mac (x) (list '= x (list '* x -1)))) | |
(= apply (mac (f args) (list f args))) | |
(= <<= (mac (a b c) (list 'and (list '<= a b) (list '<= b c)))) |
class Hexagon | |
attr_reader :x, :y, :radius, :r, :g, :b, :angle | |
def initialize args, x, y, radius, r = 0, g = 0, b = 0, angle = 0 | |
@x = x | |
@y = y | |
@radius = radius | |
@r = r | |
@g = g | |
@b = b | |
@angle = angle |