btetris_kp 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/bin/btetris_kp +5 -0
- data/btetris_kp.gemspec +25 -0
- data/lib/btetris_kp/btetris.rb +37 -0
- data/lib/btetris_kp/constants.rb +197 -0
- data/lib/btetris_kp/core/board.rb +223 -0
- data/lib/btetris_kp/core/piece.rb +79 -0
- data/lib/btetris_kp/game.rb +118 -0
- data/lib/btetris_kp/gui/menuitem.rb +44 -0
- data/lib/btetris_kp/gui/textfield.rb +66 -0
- data/lib/btetris_kp/menu.rb +83 -0
- data/lib/btetris_kp/netgame.rb +152 -0
- data/lib/btetris_kp/netjoin.rb +115 -0
- data/lib/btetris_kp/netsetup.rb +79 -0
- data/lib/btetris_kp/version.rb +3 -0
- data/lib/btetris_kp.rb +5 -0
- data/media/drop.ogg +0 -0
- data/media/pop.ogg +0 -0
- data/media/rotate.ogg +0 -0
- data/media/title.png +0 -0
- data/spec/btetris_spec.rb +15 -0
- data/spec/core/board_spec.rb +94 -0
- data/spec/core/piece_spec.rb +114 -0
- data/spec/game_spec.rb +29 -0
- data/spec/gui/menuitem_spec.rb +39 -0
- data/spec/gui/textfield_spec.rb +35 -0
- data/spec/menu_spec.rb +24 -0
- data/spec/netgame_spec.rb +75 -0
- data/spec/netjoin_spec.rb +15 -0
- data/spec/netsetup_spec.rb +16 -0
- data/spec/spec_helper.rb +5 -0
- metadata +147 -0
@@ -0,0 +1,94 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "btetris_kp/core/piece"
|
4
|
+
require "btetris_kp/core/board"
|
5
|
+
require 'spec_helper'
|
6
|
+
|
7
|
+
module BTetrisKp
|
8
|
+
describe Board do
|
9
|
+
before :each do
|
10
|
+
@board = Board.new(BTetrisWindow.new, 20, 20)
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'can initialize Board' do
|
14
|
+
@board.should(be_an_instance_of Board)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'initialization creates empty board' do
|
18
|
+
@board.board.each do |row|
|
19
|
+
row.each { |val| val.should eq 0 }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'can convert board to string' do
|
24
|
+
str = @board.to_s
|
25
|
+
str.size.should eq Const::PNR_VER * Const::PNR_HOR
|
26
|
+
str.each_char { |val| val.should eq '0' }
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'can convert string to board' do
|
30
|
+
str = @board.to_s
|
31
|
+
str[0] = '1'
|
32
|
+
str[Const::PNR_VER * Const::PNR_HOR - 1] = '2'
|
33
|
+
@board.from_s!(str)
|
34
|
+
@board.board[0][0].should eq 1
|
35
|
+
@board.board[Const::PNR_VER - 1][Const::PNR_HOR - 1].should eq 2
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'can tell if game is over' do
|
39
|
+
@board.game_over?.should eq false
|
40
|
+
@board.board[0].each_with_index { |val, y| @board.board[0][y] = 1 }
|
41
|
+
@board.game_over?.should eq true
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'can clear full rows' do
|
45
|
+
@board.board[0].each_with_index { |val, y| @board.board[0][y] = 1 }
|
46
|
+
@board.board[3].each_with_index { |val, y| @board.board[3][y] = 1 }
|
47
|
+
cnt = @board.clear_rows!
|
48
|
+
cnt.should eq 2
|
49
|
+
@board.board[0][0].should eq 0
|
50
|
+
@board.board[3][0].should eq 0
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'can move other rows correctly when clearing rows' do
|
54
|
+
@board.board[2].each_with_index { |val, y| @board.board[2][y] = 1 }
|
55
|
+
@board.board[0][0] = 1
|
56
|
+
@board.board[1][1] = 1
|
57
|
+
cnt = @board.clear_rows!
|
58
|
+
cnt.should eq 1
|
59
|
+
@board.board[1][0].should eq 1
|
60
|
+
@board.board[2][1].should eq 1
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'can insert garbage rows at the bottom of the board' do
|
64
|
+
@board.insert_garbage!(2)
|
65
|
+
@board.board[Const::PNR_VER - 1].inject(:+).should_not eq 0
|
66
|
+
@board.board[Const::PNR_VER - 1].include?(0).should eq true
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'can move other rows correctly when inserting garbage rows' do
|
70
|
+
@board.board[Const::PNR_VER - 1][0] = 1
|
71
|
+
@board.board[Const::PNR_VER - 2][0].should eq 0
|
72
|
+
@board.insert_garbage!(1)
|
73
|
+
@board.board[Const::PNR_VER - 2][0].should eq 1
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'can drop piece to the bottom of the board' do
|
77
|
+
@board.cur_piece = Piece.new(@board.board, 0, 0, 0)
|
78
|
+
@board.piece_drop!
|
79
|
+
@board.cur_piece.set_on_board
|
80
|
+
@board.board[Const::PNR_VER - 1][0].should_not eq 0
|
81
|
+
end
|
82
|
+
|
83
|
+
it 'can tell if piece is stuck (cant move further down)' do
|
84
|
+
@board.cur_piece = Piece.new(@board.board, 0, 0, 0)
|
85
|
+
@board.piece_stuck?.should eq false
|
86
|
+
@board.piece_drop!
|
87
|
+
@board.piece_stuck?.should eq true
|
88
|
+
|
89
|
+
@board.cur_piece = Piece.new(@board.board, 0, 0, 0)
|
90
|
+
@board.board[2][0] = 1
|
91
|
+
@board.piece_stuck?.should eq true
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "btetris_kp/core/piece"
|
4
|
+
require "btetris_kp/core/board"
|
5
|
+
require 'spec_helper'
|
6
|
+
|
7
|
+
module BTetrisKp
|
8
|
+
describe Piece do
|
9
|
+
before :each do
|
10
|
+
@board = Board.new(Gosu::Window.new(800, 600, false), 20, 20)
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'can initialize Piece' do
|
14
|
+
pi = Piece.new(@board.board, 10, 15, 0).should(be_an_instance_of Piece)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'can place any type of piece on empty board' do
|
18
|
+
(0...Const::TILES.size).each_with_index do |tile, index|
|
19
|
+
pi = Piece.new(@board.board, 0, 0, index)
|
20
|
+
pi.can_be_set?.should eq true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'can rotate any type of piece to both directions' do
|
25
|
+
(0...Const::TILES.size).each_with_index do |tile, index|
|
26
|
+
pi = Piece.new(@board.board, 4, 4, index)
|
27
|
+
pi.can_be_set?.should eq true
|
28
|
+
3.times do
|
29
|
+
pi.rotate_right!
|
30
|
+
pi.can_be_set?.should eq true
|
31
|
+
end
|
32
|
+
3.times do
|
33
|
+
pi.rotate_left!
|
34
|
+
pi.can_be_set?.should eq true
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'can tell if piece can be placed on board or not' do
|
40
|
+
pi = Piece.new(@board.board, 0, 0, 0)
|
41
|
+
pi.can_be_set?.should eq true
|
42
|
+
@board.board[0][0] = 1
|
43
|
+
pi.can_be_set?.should eq false
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'can move piece left' do
|
47
|
+
pi = Piece.new(@board.board, 4, 4, 0)
|
48
|
+
pi.move_left!
|
49
|
+
pi.can_be_set?.should eq true
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'can move piece right' do
|
53
|
+
pi = Piece.new(@board.board, 4, 4, 0)
|
54
|
+
pi.move_right!
|
55
|
+
pi.can_be_set?.should eq true
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'can move piece up' do
|
59
|
+
pi = Piece.new(@board.board, 4, 4, 0)
|
60
|
+
pi.move_up!
|
61
|
+
pi.can_be_set?.should eq true
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'can move piece down' do
|
65
|
+
pi = Piece.new(@board.board, 4, 4, 0)
|
66
|
+
pi.move_down!
|
67
|
+
pi.can_be_set?.should eq true
|
68
|
+
end
|
69
|
+
|
70
|
+
it 'can not place piece on full board' do
|
71
|
+
@board.board.each_with_index do |row, x|
|
72
|
+
row.each_with_index do |val, y|
|
73
|
+
@board.board[x][y] = 1
|
74
|
+
end
|
75
|
+
end
|
76
|
+
pi = Piece.new(@board.board, 4, 4, 0)
|
77
|
+
pi.can_be_set?.should eq false
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'can not place piece after moving on filled block' do
|
81
|
+
@board.board[0][0] = 1
|
82
|
+
pi = Piece.new(@board.board, 0, 1, 0)
|
83
|
+
pi.can_be_set?.should eq true
|
84
|
+
pi.move_left!
|
85
|
+
pi.can_be_set?.should eq false
|
86
|
+
end
|
87
|
+
|
88
|
+
it 'can not leave board borders when moving' do
|
89
|
+
pi = Piece.new(@board.board, 0, 0, 0)
|
90
|
+
pi.can_be_set?.should eq true
|
91
|
+
pi.move_left!
|
92
|
+
pi.can_be_set?.should eq false
|
93
|
+
pi.move_right!
|
94
|
+
pi.move_up!
|
95
|
+
pi.can_be_set?.should eq false
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'can be set on board' do
|
99
|
+
pi = Piece.new(@board.board, 0, 0, 0)
|
100
|
+
pi.can_be_set?.should eq true
|
101
|
+
@board.board[0][0].should eq 0
|
102
|
+
pi.set_on_board
|
103
|
+
@board.board[0][0].should_not eq 0
|
104
|
+
end
|
105
|
+
|
106
|
+
it 'can be unset from board' do
|
107
|
+
pi = Piece.new(@board.board, 0, 0, 0)
|
108
|
+
pi.set_on_board
|
109
|
+
@board.board[0][0].should_not eq 0
|
110
|
+
pi.unset_on_board
|
111
|
+
@board.board[0][0].should eq 0
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
data/spec/game_spec.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
module BTetrisKp
|
6
|
+
describe GameState do
|
7
|
+
before :each do
|
8
|
+
@game = GameState.new(BTetrisWindow.new, 50, 50)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'can initialize GameState (window state used for playing game)' do
|
12
|
+
@game.should(be_an_instance_of GameState)
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'can pause and unpause game' do
|
16
|
+
@game.pause!
|
17
|
+
@game.paused.should eq true
|
18
|
+
@game.pause!
|
19
|
+
@game.paused.should eq false
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'can tell if game is over' do
|
23
|
+
@game.game_over.should eq false
|
24
|
+
@game.insert_garbage!(Const::PNR_VER - 1)
|
25
|
+
Const::GAME_SPEED.times { @game.update }
|
26
|
+
@game.game_over.should eq true
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
require "btetris_kp/constants"
|
5
|
+
|
6
|
+
module BTetrisKp
|
7
|
+
describe MenuItem do
|
8
|
+
before :each do
|
9
|
+
@window = Gosu::Window.new(800, 600, false)
|
10
|
+
font = Gosu::Font.new(@window, Gosu.default_font_name, 10)
|
11
|
+
@set = false
|
12
|
+
@mi = MenuItem.new(@window, 'TEST MENU', 0, lambda { @set = true }, font, 50, 50)
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'can initialize MenuItem' do
|
16
|
+
@mi.should(be_an_instance_of MenuItem)
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'can tell if mouse is over' do
|
20
|
+
@window.mouse_x, @window.mouse_y = 0, 0
|
21
|
+
@mi.mouse_over?.should eq false
|
22
|
+
@window.mouse_x, @window.mouse_y = 0, 100
|
23
|
+
@mi.mouse_over?.should eq false
|
24
|
+
@window.mouse_x, @window.mouse_y = 400, 0
|
25
|
+
@mi.mouse_over?.should eq false
|
26
|
+
@window.mouse_x, @window.mouse_y = 400, 100
|
27
|
+
@mi.mouse_over?.should eq false
|
28
|
+
@window.mouse_x, @window.mouse_y = 55, 55
|
29
|
+
@mi.mouse_over?.should eq true
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'can call procedure when clicked' do
|
33
|
+
@window.mouse_x, @window.mouse_y = 55, 55
|
34
|
+
@mi.clicked
|
35
|
+
@set.should eq true
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
require "btetris_kp/gui/textfield"
|
5
|
+
|
6
|
+
module BTetrisKp
|
7
|
+
describe TextField do
|
8
|
+
before :each do
|
9
|
+
window = Gosu::Window.new(800, 600, false)
|
10
|
+
font = Gosu::Font.new(window, Gosu.default_font_name, 10)
|
11
|
+
@tf = TextField.new(window, font, 50, 50, '12345', /[^0-9]/, 100, 9)
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'can initialize TextField' do
|
15
|
+
@tf.should(be_an_instance_of TextField)
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'can filter text' do
|
19
|
+
@tf.filter('ah0j').should eq '0'
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'can tell if mouse is over' do
|
23
|
+
@tf.mouse_over?(0,0).should eq false
|
24
|
+
@tf.mouse_over?(0,100).should eq false
|
25
|
+
@tf.mouse_over?(300,0).should eq false
|
26
|
+
@tf.mouse_over?(300,100).should eq false
|
27
|
+
@tf.mouse_over?(55,55).should eq true
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'can set caret position depending on mouse click' do
|
31
|
+
@tf.move_caret(50)
|
32
|
+
@tf.caret_pos.should eq 0
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/spec/menu_spec.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
require "btetris_kp/btetris"
|
5
|
+
|
6
|
+
module BTetrisKp
|
7
|
+
describe MenuState do
|
8
|
+
before :each do
|
9
|
+
@ms = MenuState.new(BTetrisWindow.new)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'can initialize MenuState (window state used for main menu of the game)' do
|
13
|
+
@ms.should(be_an_instance_of MenuState)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'can generate background board' do
|
17
|
+
@ms.generate_back_board.should(be_an_instance_of Array)
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'can generate menu' do
|
21
|
+
@ms.generate_menu.should(be_an_instance_of Array)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
module BTetrisKp
|
6
|
+
# class used for testing socket connection messages
|
7
|
+
class TestSocket
|
8
|
+
attr_accessor :msg
|
9
|
+
|
10
|
+
def initialize(msg)
|
11
|
+
@msg = msg
|
12
|
+
end
|
13
|
+
|
14
|
+
def sendmsg_nonblock(s)
|
15
|
+
@msg = s
|
16
|
+
end
|
17
|
+
|
18
|
+
def recv_nonblock(cnt)
|
19
|
+
@msg
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe NetGameState do
|
24
|
+
it 'can initialize NetGameState (window state used for playing net game)' do
|
25
|
+
ng = NetGameState.new(BTetrisWindow.new, nil)
|
26
|
+
ng.should(be_an_instance_of NetGameState)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'can send pause message' do
|
30
|
+
s = TestSocket.new('')
|
31
|
+
ng = NetGameState.new(BTetrisWindow.new, s)
|
32
|
+
ng.send_msg(Const::MSG_PAUSE)
|
33
|
+
s.msg.should eq Const::MSG_PAUSE
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'can send game over message' do
|
37
|
+
s = TestSocket.new('')
|
38
|
+
ng = NetGameState.new(BTetrisWindow.new, s)
|
39
|
+
ng.send_msg(Const::MSG_GAME_OVER)
|
40
|
+
s.msg.should eq Const::MSG_GAME_OVER
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'can send message with board update' do
|
44
|
+
s = TestSocket.new('')
|
45
|
+
ng = NetGameState.new(BTetrisWindow.new, s)
|
46
|
+
ng.send_msg(Const::MSG_BOARD)
|
47
|
+
m = s.msg.split(":")
|
48
|
+
m[0].should eq Const::MSG_BOARD
|
49
|
+
b = Board.new(BTetrisWindow.new, 20, 20)
|
50
|
+
m[1].size.should eq Const::PNR_VER * Const::PNR_HOR
|
51
|
+
(m[1] =~ /^[0-9]+$/).should eq 0
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'can send garbage message' do
|
55
|
+
s = TestSocket.new('')
|
56
|
+
ng = NetGameState.new(BTetrisWindow.new, s)
|
57
|
+
ng.send_msg(Const::MSG_GARBAGE)
|
58
|
+
m = s.msg.split(":")
|
59
|
+
m[0].should eq Const::MSG_GARBAGE
|
60
|
+
m[1].to_i.should eq 0
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'can correctly interpret incoming message type' do
|
64
|
+
s = TestSocket.new(Const::MSG_PAUSE)
|
65
|
+
ng = NetGameState.new(BTetrisWindow.new, s)
|
66
|
+
ng.check_msg.should eq Const::MSG_PAUSE
|
67
|
+
s.msg = Const::MSG_GAME_OVER
|
68
|
+
ng.check_msg.should eq Const::MSG_GAME_OVER
|
69
|
+
s.msg = Const::MSG_BOARD
|
70
|
+
ng.check_msg.should eq Const::MSG_BOARD
|
71
|
+
s.msg = Const::MSG_GARBAGE
|
72
|
+
ng.check_msg.should eq Const::MSG_GARBAGE
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
module BTetrisKp
|
6
|
+
describe NetJoinState do
|
7
|
+
before :each do
|
8
|
+
@nj = NetJoinState.new(BTetrisWindow.new)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'can initialize NetJoinState (window state used for joining net game)' do
|
12
|
+
@nj.should(be_an_instance_of NetJoinState)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
module BTetrisKp
|
6
|
+
describe NetSetupState do
|
7
|
+
before :each do
|
8
|
+
@window = Gosu::Window.new(800, 600, false)
|
9
|
+
@nj = NetSetupState.new(@window)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'can initialize NetSetupState (window state used for creating net game)' do
|
13
|
+
@nj.should(be_an_instance_of NetSetupState)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,147 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: btetris_kp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Pavel Kocka
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-02-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: gosu
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.7'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.14'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.14'
|
69
|
+
description: Battle Tetris
|
70
|
+
email:
|
71
|
+
- kockapav@gmail.com
|
72
|
+
executables:
|
73
|
+
- btetris_kp
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- .gitignore
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- bin/btetris_kp
|
83
|
+
- btetris_kp.gemspec
|
84
|
+
- lib/btetris_kp.rb
|
85
|
+
- lib/btetris_kp/btetris.rb
|
86
|
+
- lib/btetris_kp/constants.rb
|
87
|
+
- lib/btetris_kp/core/board.rb
|
88
|
+
- lib/btetris_kp/core/piece.rb
|
89
|
+
- lib/btetris_kp/game.rb
|
90
|
+
- lib/btetris_kp/gui/menuitem.rb
|
91
|
+
- lib/btetris_kp/gui/textfield.rb
|
92
|
+
- lib/btetris_kp/menu.rb
|
93
|
+
- lib/btetris_kp/netgame.rb
|
94
|
+
- lib/btetris_kp/netjoin.rb
|
95
|
+
- lib/btetris_kp/netsetup.rb
|
96
|
+
- lib/btetris_kp/version.rb
|
97
|
+
- media/drop.ogg
|
98
|
+
- media/pop.ogg
|
99
|
+
- media/rotate.ogg
|
100
|
+
- media/title.png
|
101
|
+
- spec/btetris_spec.rb
|
102
|
+
- spec/core/board_spec.rb
|
103
|
+
- spec/core/piece_spec.rb
|
104
|
+
- spec/game_spec.rb
|
105
|
+
- spec/gui/menuitem_spec.rb
|
106
|
+
- spec/gui/textfield_spec.rb
|
107
|
+
- spec/menu_spec.rb
|
108
|
+
- spec/netgame_spec.rb
|
109
|
+
- spec/netjoin_spec.rb
|
110
|
+
- spec/netsetup_spec.rb
|
111
|
+
- spec/spec_helper.rb
|
112
|
+
homepage: https://github.com/kockapav/btetris_kp
|
113
|
+
licenses:
|
114
|
+
- MIT
|
115
|
+
metadata: {}
|
116
|
+
post_install_message:
|
117
|
+
rdoc_options: []
|
118
|
+
require_paths:
|
119
|
+
- lib
|
120
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - '>='
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
requirements: []
|
131
|
+
rubyforge_project:
|
132
|
+
rubygems_version: 2.2.1
|
133
|
+
signing_key:
|
134
|
+
specification_version: 4
|
135
|
+
summary: Tetris for 2 players via lan
|
136
|
+
test_files:
|
137
|
+
- spec/btetris_spec.rb
|
138
|
+
- spec/core/board_spec.rb
|
139
|
+
- spec/core/piece_spec.rb
|
140
|
+
- spec/game_spec.rb
|
141
|
+
- spec/gui/menuitem_spec.rb
|
142
|
+
- spec/gui/textfield_spec.rb
|
143
|
+
- spec/menu_spec.rb
|
144
|
+
- spec/netgame_spec.rb
|
145
|
+
- spec/netjoin_spec.rb
|
146
|
+
- spec/netsetup_spec.rb
|
147
|
+
- spec/spec_helper.rb
|