Skip to content

Instantly share code, notes, and snippets.

@ylluminarious
Created July 9, 2014 23:40
Show Gist options
  • Save ylluminarious/43d039bc875c118f2a38 to your computer and use it in GitHub Desktop.
Save ylluminarious/43d039bc875c118f2a38 to your computer and use it in GitHub Desktop.
class Paddle
def initialize (x_pos, y_pos)
@x = x_pos
@y = y_pos
end
def draw
`document.getElementById("playing_field").getContext("2d").fillStyle = "white"`
`document.getElementById("playing_field").getContext("2d").fillRect(@x, @y, 40, 40)`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment