glimmer_tetris 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6657cf18edfb6aa0f9074f5b3912cd0b820fc4c33ebb86d24158dded8d7acbb8
4
- data.tar.gz: 17da3824fec9eaaa7991a79f581aff7a684bced04aed6a805e871e4a354c9c36
3
+ metadata.gz: 8d91786e80489dc9eeb1c568ad9c8a0536bd9b4217de832f382b802939b4ad04
4
+ data.tar.gz: 5f77ad7bf5a46cbc7cceaaf2d8115ef722e4cf6459a7bf210e5358e8d44fb7c3
5
5
  SHA512:
6
- metadata.gz: a047a900db53a7c5d1a80285e5bc7317dbd08f8fb3011968e8e4b585f12910e6ceefbf013addf9de1e7684d53f72470d05a29537ba603eef577ac2cdae528524
7
- data.tar.gz: cb32ca5bbfd720c079b39709fc050cb2437b411a2b89b6c03cec6383a2624ee570c83778cd0b0d8c2f70b6353adc256f332063eafaa54bacaf63ef0c4180a6e6
6
+ metadata.gz: 18ef9f34df83efa54a2c0620e157442cf9bacc73f7035866f8cf16500b005e3d6742ac41a7062f095a9ec19528ba730320b5f369d7b06454e95181a20e8ec5b1
7
+ data.tar.gz: 7eb559773077aeac4310b9c2e5125e2a45615d47925eaa8ee5c169caedf21f9a8bf53d1b6ff05b19134c10c465e938eee0966140f501bc1210d8115f01f15169
data/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # Change Log
2
+
3
+ ## 1.0.2
4
+
5
+ - Ensure rescuing Exception in case bundler/setup does not exist when loading app/glimmer_tetris.rb
6
+
7
+ ## 1.0.1
8
+
9
+ - Support down action for Windows and Linux
10
+
11
+ ## 1.0.0
12
+
13
+ - Initial Tetris
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2021 Andy Maleh
1
+ Copyright (c) 2021-2024 Andy Maleh
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,13 +1,43 @@
1
1
  # <img alt="Glimmer Tetris Icon" src="https://raw.githubusercontent.com/AndyObtiva/glimmer_tetris/master/package/linux/Glimmer%20Tetris.png" height=85 /> Glimmer Tetris
2
2
  ## [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 /> Glimmer Application](https://github.com/AndyObtiva/glimmer-dsl-swt)
3
+ [![Gem Version](https://badge.fury.io/rb/glimmer_tetris.svg)](http://badge.fury.io/rb/glimmer_tetris)
3
4
 
4
5
  [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) External Sample.
5
6
 
6
7
  ![Glimmer Tetris](https://github.com/AndyObtiva/glimmer-dsl-swt/raw/v4.20.0.0/images/glimmer-tetris.png)
7
8
 
8
- <img alt="Glimmer Tetris Icon" src="https://raw.githubusercontent.com/AndyObtiva/glimmer_tetris/master/package/linux/Glimmer%20Tetris.png" height=40 /> [Download v1.0.0 for the Mac (x64 Big Sur and older)](https://www.dropbox.com/s/gul4kyt3m86thw8/Glimmer%20Tetris-1.0.0.dmg?dl=1)
9
+ <img alt="Glimmer Tetris Icon" src="https://raw.githubusercontent.com/AndyObtiva/glimmer_tetris/master/package/linux/Glimmer%20Tetris.png" height=40 /> [Download v1.0.0 for Mac (Big Sur and Older x64)](https://www.dropbox.com/s/gul4kyt3m86thw8/Glimmer%20Tetris-1.0.0.dmg?dl=1)
9
10
 
10
- Explained in [Best of Ruby Gems Series](https://github.com/planetruby/gems).
11
+ <img alt="Glimmer Tetris Icon" src="https://raw.githubusercontent.com/AndyObtiva/glimmer_tetris/master/package/linux/Glimmer%20Tetris.png" height=40 /> [Download v1.0.1 for Windows (10 x64)](https://www.dropbox.com/s/ggpfu4abuthjydw/Glimmer%20Tetris-1.0.1.msi?dl=1)
12
+
13
+ Explained in [Best of Ruby Gems Series Tutorials](https://github.com/planetruby/gems) on [Planet Ruby](http://planetruby.github.io/):
14
+ 1. [glimmer_tetris Gem - Glimmer Tetris - The Playfield - Get Tetris Working in One Day!](https://github.com/planetruby/gems/blob/master/glimmer/05-glimmer-tetris-playfield.md)
15
+ 2. [glimmer_tetris Gem - Glimmer Tetris - The Score Lane - See Your Game Progress!](https://github.com/planetruby/gems/blob/master/glimmer/06-glimmer-tetris-score_lane.md)
16
+ 3. [glimmer_tetris Gem - Glimmer Tetris - High Scores, Menu, & Icon - Show Others How Good You Are!](https://github.com/planetruby/gems/blob/master/glimmer/07-glimmer-tetris-high-score-dialog-menu-bar-icon.md)
17
+
18
+ Other [Glimmer](https://github.com/AndyObtiva/glimmer) games:
19
+
20
+ [<img alt="Glimmer Klondike Solitaire Icon" src="https://raw.githubusercontent.com/AndyObtiva/glimmer_klondike_solitaire/master/icons/linux/Glimmer%20Klondike%20Solitaire.png" height=40 /> Glimmer Klondike Solitaire](https://github.com/AndyObtiva/glimmer_klondike_solitaire)
21
+
22
+ [<img alt="Glimmer Wordle Icon" src="https://raw.githubusercontent.com/AndyObtiva/glimmer_wordle/master/icons/linux/Glimmer%20Wordle.png" height=40 /> Glimmer Wordle](https://github.com/AndyObtiva/glimmer_wordle)
23
+
24
+ ## Ruby Gem
25
+
26
+ If you are a software engineer and would rather install this game as a Ruby gem, please follow these instructions.
27
+
28
+ First, make sure you have all the [prerequisites of Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt/tree/v4.20.0.5#pre-requisites) setup on your machine like Java and JRuby.
29
+
30
+ Run:
31
+
32
+ ```
33
+ gem install glimmer_tetris
34
+ ```
35
+
36
+ Afterwards, run:
37
+
38
+ ```
39
+ glimmer_tetris
40
+ ```
11
41
 
12
42
  Contributing to glimmer_tetris
13
43
  ------------------------------------------
@@ -26,9 +56,14 @@ Contributing to glimmer_tetris
26
56
  is fine, but please isolate to its own commit so I can cherry-pick
27
57
  around it.
28
58
 
59
+ Change Log
60
+ ----------
61
+
62
+ [CHANGELOG.md](CHANGELOG.md)
63
+
29
64
  Copyright
30
65
  ---------
31
66
 
32
67
  [MIT](LICENSE.txt)
33
68
 
34
- Copyright (c) 2021 Andy Maleh.
69
+ Copyright (c) 2021-2024 Andy Maleh.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.2
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2021-2024 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2021-2024 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2021-2024 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2021-2024 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2021-2024 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -47,7 +47,17 @@ class GlimmerTetris
47
47
  on_swt_keydown { |key_event|
48
48
  case key_event.keyCode
49
49
  when swt(:arrow_down), 's'.bytes.first
50
- game.down! if OS.mac?
50
+ if OS.mac?
51
+ game.down!
52
+ else
53
+ # rate limit downs in Windows/Linux as they go too fast when key is held
54
+ @queued_downs ||= 0
55
+ @queued_downs += 1
56
+ async_exec do
57
+ game.down! if @queued_downs < 3
58
+ @queued_downs -= 1
59
+ end
60
+ end
51
61
  when swt(:arrow_up)
52
62
  case game.up_arrow_action
53
63
  when :instant_down
@@ -103,7 +113,7 @@ class GlimmerTetris
103
113
  shell(:no_resize) {
104
114
  grid_layout 2, false
105
115
  text 'Glimmer Tetris'
106
- minimum_size 475, 500
116
+ minimum_size 500, 500
107
117
 
108
118
  tetris_menu_bar(game: @game)
109
119
 
@@ -123,9 +133,7 @@ class GlimmerTetris
123
133
  sleep @game.delay
124
134
  break if @game.game_over? || body_root.disposed?
125
135
  # ensure entire game tetromino down movement happens as one GUI update event with sync_exec (to avoid flicker/stutter)
126
- sync_exec {
127
- @game.down! unless @game.paused?
128
- }
136
+ sync_exec { @game.down! unless @game.paused? }
129
137
  end
130
138
  end
131
139
  end
@@ -140,7 +148,7 @@ class GlimmerTetris
140
148
  def show_about_dialog
141
149
  message_box {
142
150
  text 'Glimmer Tetris'
143
- message "Glimmer Tetris\n\nGlimmer DSL for SWT Sample\n\nCopyright (c) 2021 Andy Maleh"
151
+ message "Glimmer Tetris\n\nGlimmer DSL for SWT Sample\n\nCopyright (c) 2021-2024 Andy Maleh"
144
152
  }.open
145
153
  end
146
154
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2021-2024 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2021-2024 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2021-2024 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2021-2024 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -35,7 +35,6 @@ class GlimmerTetris
35
35
  center true
36
36
  fill true
37
37
  margin_width 0
38
- margin_right BLOCK_SIZE
39
38
  margin_height BLOCK_SIZE
40
39
  }
41
40
  label(:center) {
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2021-2024 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2021 Andy Maleh
1
+ # Copyright (c) 2021-2024 Andy Maleh
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining
4
4
  # a copy of this software and associated documentation files (the
@@ -24,7 +24,7 @@ $LOAD_PATH.unshift(File.expand_path('..', __FILE__))
24
24
  begin
25
25
  require 'bundler/setup'
26
26
  Bundler.require(:default)
27
- rescue
27
+ rescue Exception
28
28
  require 'glimmer-dsl-swt'
29
29
  require 'glimmer-cp-bevel'
30
30
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer_tetris
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-25 00:00:00.000000000 Z
11
+ date: 2024-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -103,6 +103,7 @@ extra_rdoc_files:
103
103
  - LICENSE.txt
104
104
  - README.md
105
105
  files:
106
+ - CHANGELOG.md
106
107
  - LICENSE.txt
107
108
  - README.md
108
109
  - VERSION
@@ -121,6 +122,7 @@ files:
121
122
  - bin/generate_app_icon.rb
122
123
  - bin/glimmer_tetris
123
124
  - config/warble.rb
125
+ - glimmer_tetris.gemspec
124
126
  - package/linux/Glimmer Tetris.png
125
127
  - package/macosx/Glimmer Tetris.icns
126
128
  - package/windows/Glimmer Tetris.ico
@@ -146,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
148
  - !ruby/object:Gem::Version
147
149
  version: '0'
148
150
  requirements: []
149
- rubygems_version: 3.1.6
151
+ rubygems_version: 3.3.6
150
152
  signing_key:
151
153
  specification_version: 4
152
154
  summary: Glimmer Tetris