├── texture.jpg ├── Gemfile ├── package.json ├── README.md ├── LICENSE ├── _config.yml ├── stats.js ├── Gemfile.lock └── index.html /texture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksdkamesh99/reviewing-a-pull-request/main/texture.jpg -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "github-pages", '>= 207' 4 | gem "minitest" 5 | gem "test-unit" 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "github-games", 3 | "repository": { 4 | "type": "git", 5 | "url": "https://github.com/brianamarie/github-games.git" 6 | }, 7 | "description": "Simple JS game", 8 | "author": "https://twitter.com/brianamarie", 9 | "version": "1.0.0" 10 | } 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Welcome to awesome game of Tetris 2 | 3 | A project based learning activity for people who are getting started with Git and GitHub. 4 | You can play the game at: https://ksdkamesh99.github.io/github-games/ 5 | To play the game: 6 | 1. Go to the **Settings** tab of this repository. 7 | 1. Scroll down to the section titled _GitHub Pages_ 8 | 1. Select **Master** from the Source drop-down. 9 | 1. Click **Save**. 10 | 1. Navigate to the URL provided in the same section. 11 | 12 | ### Instructions for playing the game 13 | 14 | 1. Press the space bar to begin. 15 | 2. Use the up and down arrow keys to rotate the shape. 16 | 3. Use the left and right arrow keys to position the shape. 17 | 4. The goal is to create complete rows with no empty spaces. 18 | 5. When completed, the rows will disappear. 19 | 6. To pause the game, just press the space bar again. 20 | 21 | >> _*SUPPORTED BROWSERS*: Chrome, Firefox, Safari, Opera and IE9+_ 22 | 23 | This fun open source game was cloned from: https://github.com/jakesgordon/javascript-tetris 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, 2012, 2013 Jake Gordon and contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Name of your blog (this will show up at the top of your page and in the RSS feed) 2 | name: GitHub Games 3 | 4 | # Short description (goes below the title; it will also be used in the RSS feed) 5 | description: This GitHub Games has lots of tests 6 | 7 | # Your name, as you want it to appear underneath each post and in the footer 8 | author: GitHub Training, but forked 9 | 10 | # Your email if you want it to be linked on the contact page 11 | author_email: you@example.com 12 | 13 | # The directory for category index pages. Change it to something else if 14 | # for example you want links like /categories/category1 instead of /category1 15 | category_dir: / 16 | 17 | # Uncomment if you are planning to run the blog in a subdirectory 18 | # Note - if you enable this, and attempt to view your site locally you have to use the baseurl in your local path. 19 | # Example, you must use http://localhost:4000/path/to/blog 20 | #baseurl: /path/to/blog 21 | # baseurl: 22 | 23 | # The URL of your actual domain. This will be used to make absolute links in the RSS feed. 24 | # url: http://yourdomain.com/ 25 | 26 | #### Under the Hood Stuff ##### 27 | 28 | # Use rdiscount as the markdown engine because it generates html5 compliant code for stuff like footnotes 29 | # If you use maroku (default engine) some of your generated pages may not validate or lint as html5 30 | # If you don't have it install it via gem install rdiscount 31 | markdown: kramdown 32 | 33 | # Makes pretty (descriptive) permalinks. See Jekyll docs for alternatives. 34 | permalink: pretty 35 | 36 | # How many articles do you wish to appear on the front page: 37 | paginate: 3 38 | 39 | # Exclude metadata and development time dependencies (like Grunt plugins) 40 | # exclude: [README.markdown, package.json, grunt.js, Gruntfile.js, Gruntfile.coffee, node_modules] 41 | gems: [jekyll-paginate] 42 | -------------------------------------------------------------------------------- /stats.js: -------------------------------------------------------------------------------- 1 | // stats.js r6 - http://github.com/mrdoob/stats.js 2 | var Stats=function(){function s(a,g,d){var f,c,e;for(c=0;c<30;c++)for(f=0;f<73;f++)e=(f+c*74)*4,a[e]=a[e+4],a[e+1]=a[e+5],a[e+2]=a[e+6];for(c=0;c<30;c++)e=(73+c*74)*4,c'+n+" MS ("+z+"-"+A+")";o.putImageData(B,0,0);F=j;if(j> 9 | v+1E3){l=Math.round(u*1E3/(j-v));w=Math.min(w,l);x=Math.max(x,l);s(y.data,Math.min(30,30-l/100*30),"fps");d.innerHTML=''+l+" FPS ("+w+"-"+x+")";m.putImageData(y,0,0);if(t==3)p=performance.memory.usedJSHeapSize*9.54E-7,C=Math.min(C,p),D=Math.max(D,p),s(E.data,Math.min(30,30-p/2),"mb"),i.innerHTML=''+Math.round(p)+" MB ("+Math.round(C)+"-"+Math.round(D)+")",q.putImageData(E,0,0);v=j;u=0}}}}; 10 | 11 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | activesupport (6.0.3.2) 5 | concurrent-ruby (~> 1.0, >= 1.0.2) 6 | i18n (>= 0.7, < 2) 7 | minitest (~> 5.1) 8 | tzinfo (~> 1.1) 9 | zeitwerk (~> 2.2, >= 2.2.2) 10 | addressable (2.7.0) 11 | public_suffix (>= 2.0.2, < 5.0) 12 | coffee-script (2.4.1) 13 | coffee-script-source 14 | execjs 15 | coffee-script-source (1.11.1) 16 | colorator (1.1.0) 17 | commonmarker (0.17.13) 18 | ruby-enum (~> 0.5) 19 | concurrent-ruby (1.1.7) 20 | dnsruby (1.61.4) 21 | simpleidn (~> 0.1) 22 | em-websocket (0.5.1) 23 | eventmachine (>= 0.12.9) 24 | http_parser.rb (~> 0.6.0) 25 | ethon (0.12.0) 26 | ffi (>= 1.3.0) 27 | eventmachine (1.2.7) 28 | execjs (2.7.0) 29 | faraday (1.0.1) 30 | multipart-post (>= 1.2, < 3) 31 | ffi (1.13.1) 32 | forwardable-extended (2.6.0) 33 | gemoji (3.0.1) 34 | github-pages (207) 35 | github-pages-health-check (= 1.16.1) 36 | jekyll (= 3.9.0) 37 | jekyll-avatar (= 0.7.0) 38 | jekyll-coffeescript (= 1.1.1) 39 | jekyll-commonmark-ghpages (= 0.1.6) 40 | jekyll-default-layout (= 0.1.4) 41 | jekyll-feed (= 0.13.0) 42 | jekyll-gist (= 1.5.0) 43 | jekyll-github-metadata (= 2.13.0) 44 | jekyll-mentions (= 1.5.1) 45 | jekyll-optional-front-matter (= 0.3.2) 46 | jekyll-paginate (= 1.1.0) 47 | jekyll-readme-index (= 0.3.0) 48 | jekyll-redirect-from (= 0.15.0) 49 | jekyll-relative-links (= 0.6.1) 50 | jekyll-remote-theme (= 0.4.1) 51 | jekyll-sass-converter (= 1.5.2) 52 | jekyll-seo-tag (= 2.6.1) 53 | jekyll-sitemap (= 1.4.0) 54 | jekyll-swiss (= 1.0.0) 55 | jekyll-theme-architect (= 0.1.1) 56 | jekyll-theme-cayman (= 0.1.1) 57 | jekyll-theme-dinky (= 0.1.1) 58 | jekyll-theme-hacker (= 0.1.1) 59 | jekyll-theme-leap-day (= 0.1.1) 60 | jekyll-theme-merlot (= 0.1.1) 61 | jekyll-theme-midnight (= 0.1.1) 62 | jekyll-theme-minimal (= 0.1.1) 63 | jekyll-theme-modernist (= 0.1.1) 64 | jekyll-theme-primer (= 0.5.4) 65 | jekyll-theme-slate (= 0.1.1) 66 | jekyll-theme-tactile (= 0.1.1) 67 | jekyll-theme-time-machine (= 0.1.1) 68 | jekyll-titles-from-headings (= 0.5.3) 69 | jemoji (= 0.11.1) 70 | kramdown (= 2.3.0) 71 | kramdown-parser-gfm (= 1.1.0) 72 | liquid (= 4.0.3) 73 | mercenary (~> 0.3) 74 | minima (= 2.5.1) 75 | nokogiri (>= 1.10.4, < 2.0) 76 | rouge (= 3.19.0) 77 | terminal-table (~> 1.4) 78 | github-pages-health-check (1.16.1) 79 | addressable (~> 2.3) 80 | dnsruby (~> 1.60) 81 | octokit (~> 4.0) 82 | public_suffix (~> 3.0) 83 | typhoeus (~> 1.3) 84 | html-pipeline (2.14.0) 85 | activesupport (>= 2) 86 | nokogiri (>= 1.4) 87 | http_parser.rb (0.6.0) 88 | i18n (0.9.5) 89 | concurrent-ruby (~> 1.0) 90 | jekyll (3.9.0) 91 | addressable (~> 2.4) 92 | colorator (~> 1.0) 93 | em-websocket (~> 0.5) 94 | i18n (~> 0.7) 95 | jekyll-sass-converter (~> 1.0) 96 | jekyll-watch (~> 2.0) 97 | kramdown (>= 1.17, < 3) 98 | liquid (~> 4.0) 99 | mercenary (~> 0.3.3) 100 | pathutil (~> 0.9) 101 | rouge (>= 1.7, < 4) 102 | safe_yaml (~> 1.0) 103 | jekyll-avatar (0.7.0) 104 | jekyll (>= 3.0, < 5.0) 105 | jekyll-coffeescript (1.1.1) 106 | coffee-script (~> 2.2) 107 | coffee-script-source (~> 1.11.1) 108 | jekyll-commonmark (1.3.1) 109 | commonmarker (~> 0.14) 110 | jekyll (>= 3.7, < 5.0) 111 | jekyll-commonmark-ghpages (0.1.6) 112 | commonmarker (~> 0.17.6) 113 | jekyll-commonmark (~> 1.2) 114 | rouge (>= 2.0, < 4.0) 115 | jekyll-default-layout (0.1.4) 116 | jekyll (~> 3.0) 117 | jekyll-feed (0.13.0) 118 | jekyll (>= 3.7, < 5.0) 119 | jekyll-gist (1.5.0) 120 | octokit (~> 4.2) 121 | jekyll-github-metadata (2.13.0) 122 | jekyll (>= 3.4, < 5.0) 123 | octokit (~> 4.0, != 4.4.0) 124 | jekyll-mentions (1.5.1) 125 | html-pipeline (~> 2.3) 126 | jekyll (>= 3.7, < 5.0) 127 | jekyll-optional-front-matter (0.3.2) 128 | jekyll (>= 3.0, < 5.0) 129 | jekyll-paginate (1.1.0) 130 | jekyll-readme-index (0.3.0) 131 | jekyll (>= 3.0, < 5.0) 132 | jekyll-redirect-from (0.15.0) 133 | jekyll (>= 3.3, < 5.0) 134 | jekyll-relative-links (0.6.1) 135 | jekyll (>= 3.3, < 5.0) 136 | jekyll-remote-theme (0.4.1) 137 | addressable (~> 2.0) 138 | jekyll (>= 3.5, < 5.0) 139 | rubyzip (>= 1.3.0) 140 | jekyll-sass-converter (1.5.2) 141 | sass (~> 3.4) 142 | jekyll-seo-tag (2.6.1) 143 | jekyll (>= 3.3, < 5.0) 144 | jekyll-sitemap (1.4.0) 145 | jekyll (>= 3.7, < 5.0) 146 | jekyll-swiss (1.0.0) 147 | jekyll-theme-architect (0.1.1) 148 | jekyll (~> 3.5) 149 | jekyll-seo-tag (~> 2.0) 150 | jekyll-theme-cayman (0.1.1) 151 | jekyll (~> 3.5) 152 | jekyll-seo-tag (~> 2.0) 153 | jekyll-theme-dinky (0.1.1) 154 | jekyll (~> 3.5) 155 | jekyll-seo-tag (~> 2.0) 156 | jekyll-theme-hacker (0.1.1) 157 | jekyll (~> 3.5) 158 | jekyll-seo-tag (~> 2.0) 159 | jekyll-theme-leap-day (0.1.1) 160 | jekyll (~> 3.5) 161 | jekyll-seo-tag (~> 2.0) 162 | jekyll-theme-merlot (0.1.1) 163 | jekyll (~> 3.5) 164 | jekyll-seo-tag (~> 2.0) 165 | jekyll-theme-midnight (0.1.1) 166 | jekyll (~> 3.5) 167 | jekyll-seo-tag (~> 2.0) 168 | jekyll-theme-minimal (0.1.1) 169 | jekyll (~> 3.5) 170 | jekyll-seo-tag (~> 2.0) 171 | jekyll-theme-modernist (0.1.1) 172 | jekyll (~> 3.5) 173 | jekyll-seo-tag (~> 2.0) 174 | jekyll-theme-primer (0.5.4) 175 | jekyll (> 3.5, < 5.0) 176 | jekyll-github-metadata (~> 2.9) 177 | jekyll-seo-tag (~> 2.0) 178 | jekyll-theme-slate (0.1.1) 179 | jekyll (~> 3.5) 180 | jekyll-seo-tag (~> 2.0) 181 | jekyll-theme-tactile (0.1.1) 182 | jekyll (~> 3.5) 183 | jekyll-seo-tag (~> 2.0) 184 | jekyll-theme-time-machine (0.1.1) 185 | jekyll (~> 3.5) 186 | jekyll-seo-tag (~> 2.0) 187 | jekyll-titles-from-headings (0.5.3) 188 | jekyll (>= 3.3, < 5.0) 189 | jekyll-watch (2.2.1) 190 | listen (~> 3.0) 191 | jemoji (0.11.1) 192 | gemoji (~> 3.0) 193 | html-pipeline (~> 2.2) 194 | jekyll (>= 3.0, < 5.0) 195 | kramdown (2.3.0) 196 | rexml 197 | kramdown-parser-gfm (1.1.0) 198 | kramdown (~> 2.0) 199 | liquid (4.0.3) 200 | listen (3.2.1) 201 | rb-fsevent (~> 0.10, >= 0.10.3) 202 | rb-inotify (~> 0.9, >= 0.9.10) 203 | mercenary (0.3.6) 204 | mini_portile2 (2.5.0) 205 | minima (2.5.1) 206 | jekyll (>= 3.5, < 5.0) 207 | jekyll-feed (~> 0.9) 208 | jekyll-seo-tag (~> 2.1) 209 | minitest (5.13.0) 210 | multipart-post (2.1.1) 211 | nokogiri (1.11.1) 212 | mini_portile2 (~> 2.5.0) 213 | racc (~> 1.4) 214 | octokit (4.18.0) 215 | faraday (>= 0.9) 216 | sawyer (~> 0.8.0, >= 0.5.3) 217 | pathutil (0.16.2) 218 | forwardable-extended (~> 2.6) 219 | power_assert (1.1.3) 220 | public_suffix (3.1.1) 221 | racc (1.5.2) 222 | rb-fsevent (0.10.4) 223 | rb-inotify (0.10.1) 224 | ffi (~> 1.0) 225 | rexml (3.2.4) 226 | rouge (3.19.0) 227 | ruby-enum (0.8.0) 228 | i18n 229 | rubyzip (2.3.0) 230 | safe_yaml (1.0.5) 231 | sass (3.7.4) 232 | sass-listen (~> 4.0.0) 233 | sass-listen (4.0.0) 234 | rb-fsevent (~> 0.9, >= 0.9.4) 235 | rb-inotify (~> 0.9, >= 0.9.7) 236 | sawyer (0.8.2) 237 | addressable (>= 2.3.5) 238 | faraday (> 0.8, < 2.0) 239 | simpleidn (0.1.1) 240 | unf (~> 0.1.4) 241 | terminal-table (1.8.0) 242 | unicode-display_width (~> 1.1, >= 1.1.1) 243 | test-unit (3.2.8) 244 | power_assert 245 | thread_safe (0.3.6) 246 | typhoeus (1.4.0) 247 | ethon (>= 0.9.0) 248 | tzinfo (1.2.7) 249 | thread_safe (~> 0.1) 250 | unf (0.1.4) 251 | unf_ext 252 | unf_ext (0.0.7.7) 253 | unicode-display_width (1.7.0) 254 | zeitwerk (2.4.0) 255 | 256 | PLATFORMS 257 | ruby 258 | 259 | DEPENDENCIES 260 | github-pages (>= 207) 261 | minitest 262 | test-unit 263 | 264 | BUNDLED WITH 265 | 1.17.3 266 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Javascript Tetris 5 | 25 | 26 | 27 | 28 | 29 |
30 | 36 | 37 | Sorry, this example cannot be run because your browser does not support the <canvas> element 38 | 39 |
40 | 41 | 42 | 456 | 457 | 458 | 459 | --------------------------------------------------------------------------------