Ruby simple 2D simulator