{"id":31781228,"url":"https://github.com/giuse/jr_pong","last_synced_at":"2025-10-18T01:24:47.200Z","repository":{"id":23354342,"uuid":"26715247","full_name":"giuse/jr_pong","owner":"giuse","description":"JRuby Pong example","archived":false,"fork":false,"pushed_at":"2014-11-24T09:05:20.000Z","size":11480,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T08:40:02.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giuse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-16T13:42:59.000Z","updated_at":"2014-11-24T09:05:24.000Z","dependencies_parsed_at":"2022-07-20T23:28:42.278Z","dependency_job_id":null,"html_url":"https://github.com/giuse/jr_pong","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/giuse/jr_pong","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuse%2Fjr_pong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuse%2Fjr_pong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuse%2Fjr_pong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuse%2Fjr_pong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giuse","download_url":"https://codeload.github.com/giuse/jr_pong/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuse%2Fjr_pong/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279446948,"owners_count":26171842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T08:31:42.228Z","updated_at":"2025-10-18T01:24:47.162Z","avatar_url":"https://github.com/giuse.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"### DISCLAIMER\nThis game is just a personal test for JRuby, java videogame libraries, and my current state on the Ruby path. Also, it is meant to be shared with non-rubist friends. It's just a \"weekend project\", and it all started from here:\nhttp://www.rubyinside.com/video-game-ruby-tutorial-5726.html\nDear fellow Peter Cooper is responsible for the main idea, the graphics, inspiration, support, installation, all the initial code (hand-transcripted from the page) and I guess some of the final one too. Please delegate all copyright, ownership, licenses and whatever to the URL above.\nThanks to the Technology Astronauts for the hardware and the teaching, in particular \"your value is in the skills you own, not the code\". Ways to go Peter, thanks a bunch! :)\n\n### Installation\n- Install `rvm` and `jruby` with `\\curl -sSL https://get.rvm.io | bash -s stable --ruby=jruby`\n- Clone the project with `git clone git@github.com:giuseppecuccu/jr_pong.git`, and `cd` into it\n- Check ruby's fine with `ruby -v` (should return `jruby` + version)\n- Install prerequisite libraries (ruby's `gems`) with `bundle install`\n- Launch the game executable from the shell as `./jr_pong.rb`\n\n### Remember that in Ruby:\n- Variable names starting with an `@` refer to instance variables, and as such they have instance scope and visibility\n- Instance variables do not need declaration, and have `nil` value until assigned otherwise\n- Variable names without `@` are local to the function scope\n- Variable names all in capital letters are constants\n- Method `attr_reader` generates getters for the variables named in the parameters - respectively `attr_writer` for setters, and `attr_accessor` for both\n- Multiple assignment is possible (es. `a,b,c=[1,2,3]; print b #=\u003e 2`)\n- Parenthesis after methods names are optional (both method declaration and calling with parameters)\n- Column `:` in front of a name defines a symbol, see it as a sort of efficient lightweight string for fast name comparisons\n- By convention, `Class#method` refers to an instance method, `Class::method` is a class method, `Class.method` is an usage example\n- Keyword `include` means the content of the named module is \"copy and pasted\" in place, similarly to C inclusion of files\n- \"When Java is involved, always fill in the full prototype\"\n- In Ruby, like Java, everything is passed \"by reference\", but then copies are made by some functions as return values.\n- The splat operator `*` \"captures all remaining arguments in an array\" when put in front of a function parameter name, and \"passes all content of an array\" when in front of an Array. This means that `def f(*args) g(*args) end` means that `g` is called with exactly the same parameters as `f` (practically an alias, like calling `alias_method :g, :f`).\n\n### TODO\n- add `gem 'pry-stack_explorer` to `Gemfile`\n- reorganize directories (put java/slick away)\n- use paddle corners\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiuse%2Fjr_pong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiuse%2Fjr_pong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiuse%2Fjr_pong/lists"}