tttazures 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/spec/coverage/index.html +1 -1
- data/spec/factory_spec.rb +61 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1168abf27e3a67e642de4ce6489073d60bcd6a33
|
4
|
+
data.tar.gz: 7d9f7a49014560a229d95e0319354da3d1dd9dff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12f0e8b45f9efd75ed44a4dd895661cbf0489b29655bc916846ce0e51038435df8d675b7f35998f75bc6195acc99c79c465c294a3661fa410caa5697d1514ba5
|
7
|
+
data.tar.gz: 9bef683997f964cd5cceb15f9b931dcb1e1f59e99cb171b1eafe8ff3f1256586e27bb40c95546b6d1d70f28f91ac2b4a93cfeaea2152e25928e7c750b5635eee
|
data/spec/coverage/index.html
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<img src="./assets/0.7.1/loading.gif" alt="loading"/>
|
15
15
|
</div>
|
16
16
|
<div id="wrapper" style="display:none;">
|
17
|
-
<div class="timestamp">Generated <abbr class="timeago" title="2013-07-
|
17
|
+
<div class="timestamp">Generated <abbr class="timeago" title="2013-07-24T09:49:59-05:00">2013-07-24T09:49:59-05:00</abbr></div>
|
18
18
|
<ul class="group_tabs"></ul>
|
19
19
|
|
20
20
|
<div id="content">
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Factory do
|
4
|
+
|
5
|
+
let(:factory) {f = Factory.new}
|
6
|
+
|
7
|
+
describe 'get_board' do
|
8
|
+
|
9
|
+
it "returns a 3x3 board" do
|
10
|
+
board = factory.get_board(:three_by_three)
|
11
|
+
board.should be_an_instance_of TwoDimensionalBoard
|
12
|
+
board.row_length.should == 3
|
13
|
+
end
|
14
|
+
|
15
|
+
it "returns a 4x4 board" do
|
16
|
+
board = factory.get_board(:four_by_four)
|
17
|
+
board.should be_an_instance_of TwoDimensionalBoard
|
18
|
+
board.row_length.should == 4
|
19
|
+
end
|
20
|
+
|
21
|
+
it "returns a 5x5 board" do
|
22
|
+
board = factory.get_board(:five_by_five)
|
23
|
+
board.should be_an_instance_of TwoDimensionalBoard
|
24
|
+
board.row_length.should == 5
|
25
|
+
end
|
26
|
+
|
27
|
+
it "returns a 3x3x3 board" do
|
28
|
+
board = factory.get_board(:cube_three)
|
29
|
+
board.should be_an_instance_of ThreeDimensionalBoard
|
30
|
+
board.row_length.should == 3
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "get_player" do
|
36
|
+
|
37
|
+
it "returns a human player" do
|
38
|
+
player = factory.get_player(:human, :x)
|
39
|
+
player.should be_an_instance_of HumanPlayer
|
40
|
+
end
|
41
|
+
|
42
|
+
it "returns an easy ai player" do
|
43
|
+
player = factory.get_player(:easy_ai, :x)
|
44
|
+
player.should be_an_instance_of ComputerAI
|
45
|
+
player.threshold.should == 10
|
46
|
+
end
|
47
|
+
|
48
|
+
it "returns a medium ai player" do
|
49
|
+
player = factory.get_player(:medium_ai, :x)
|
50
|
+
player.should be_an_instance_of ComputerAI
|
51
|
+
player.threshold.should == 50
|
52
|
+
end
|
53
|
+
|
54
|
+
it "returns an unbeatable ai player" do
|
55
|
+
player = factory.get_player(:unbeatable_ai, :x)
|
56
|
+
player.should be_an_instance_of ComputerAI
|
57
|
+
player.threshold.should == 100
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tttazures
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Zures
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png
|
71
71
|
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png
|
72
72
|
- spec/coverage/index.html
|
73
|
+
- spec/factory_spec.rb
|
73
74
|
- spec/human_player_spec.rb
|
74
75
|
- spec/long_tests.rb
|
75
76
|
- spec/spec_helper.rb
|
@@ -145,6 +146,7 @@ test_files:
|
|
145
146
|
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png
|
146
147
|
- spec/coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png
|
147
148
|
- spec/coverage/index.html
|
149
|
+
- spec/factory_spec.rb
|
148
150
|
- spec/human_player_spec.rb
|
149
151
|
- spec/long_tests.rb
|
150
152
|
- spec/spec_helper.rb
|