martha 0.0.3 → 0.1.0

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
  SHA1:
3
- metadata.gz: 2799359df4fe5218e80ae3b1bad71b8d3923d731
4
- data.tar.gz: 8570ee37a1a219216ba8f611ee50358486292f23
3
+ metadata.gz: 824e83e11dc3015254999fedc41a812148613f3f
4
+ data.tar.gz: 8540339e71bd19e4308430a4c0ca3338cb4ad2d9
5
5
  SHA512:
6
- metadata.gz: 733ba718f0145502876be5b38fc3ccb1b45397a0f9b3ddfc4bee4d10f0431a87c5631afcad5d921e9e3344c412c97959d3c10a9d39523c51aaaff3f468cd04e9
7
- data.tar.gz: 4fd5bf405afd9ba07dc291c6b025f91189d97bb2ceb299c3083ac9783f48de72844a3d8701551f0a1cc3a7491c560759be2290d03a3ee9cc8360c5b16d61de0d
6
+ metadata.gz: 2de25b9405c0948eb01a9f13d989793bb12415e341d0c597ab691f46cf4d2b64c94a90f12a712300a918fbf2940387d8f01c5f5386cdc5ab7564b2f1d5ce9d34
7
+ data.tar.gz: 6e5b96d1f869ea883a32822f19b6c6002850c5720cc757445531b12e64a01a45047cf7c2d8c51402d6d23443da8cf5129ab35ff8fb3ee53ed8b6e08e641510b2
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .DS_Store
11
+ *.swp
12
+ *.swo
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![Logo](http://orig06.deviantart.net/e1d4/f/2016/241/4/2/logo_by_sirgalahad31416-dafpswm.png)
1
+ <p align="center"> <IMG SRC="http://orig13.deviantart.net/da3a/f/2016/241/7/3/147240327271421_by_sirgalahad31416-dafpy5d.png" ALT="Texto alternativo a la imagen"></p>
2
2
  # Martha
3
3
  Gem that documents code/software for a better organisation and understanding of it by developers.
4
4
 
@@ -1,3 +1,3 @@
1
1
  module Martha
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.1.0'.freeze
3
3
  end
data/main.cpp ADDED
@@ -0,0 +1,262 @@
1
+ //
2
+ // main.cpp
3
+ // Boogle
4
+ //
5
+ // Created by Victor Elizalde on 20/11/15.
6
+ // Copyright © 2015 Victor Elizalde. All rights reserved.
7
+ //
8
+
9
+ #include <iostream>
10
+ #include <string>
11
+ using namespace std;
12
+
13
+ struct Hola{
14
+ int a = 2;
15
+ }
16
+
17
+ /*
18
+ Title: Puntaje
19
+ Input: string strPalabras, int sum
20
+ Input Description: a
21
+ Output: int
22
+ Output Description: a
23
+ Description: a
24
+ Author: Victor
25
+ */
26
+ int Puntaje(string strPalabras, int sum) //function
27
+ {
28
+ if(strPalabras.length() == 3 or strPalabras.length() == 4)
29
+ return sum += 1;
30
+ else if(strPalabras.length() == 5)
31
+ return sum += 2;
32
+ else if(strPalabras.length() == 6)
33
+ return sum += 3;
34
+ else if(strPalabras.length() == 7)
35
+ return sum += 5;
36
+ else if(strPalabras.length() >= 8)
37
+ return sum += 11;
38
+ return sum;
39
+ }
40
+
41
+ /*
42
+ Title: Posicion
43
+ Input: int a
44
+ Input Description: a
45
+ Output: Hola
46
+ Output Description: a
47
+ Description: a
48
+ Author: Victor
49
+ */
50
+ Hola Posicion(int a) //function
51
+ {
52
+ Hola i;
53
+ i.a = a;
54
+ return i;
55
+ }
56
+
57
+ /*
58
+ Title: ChecaAlrededor
59
+ Input: int i, int j, string strPalabras, char matBoggle[4][4], bool matbool[4][4], int h
60
+ Input Description: a
61
+ Output: bool
62
+ Output Description: a
63
+ Description: a
64
+ Author: Victor
65
+ */
66
+ bool ChecaAlrededor(int i, int j, string strPalabras, char matBoggle[4][4], bool matbool[4][4], int h) //function
67
+ {
68
+ bool b = false;
69
+ if(i < 0 or i > 3 or j < 0 or j > 3)
70
+ {
71
+ return false;
72
+ }
73
+
74
+ if(matbool[i+1][j-1] == false && matBoggle[i+1][j-1] == strPalabras[h])
75
+ {
76
+ if(h == strPalabras.length()-1)
77
+ {
78
+ return true;
79
+ }
80
+ //cout << 7 << endl;
81
+ matbool[i+1][j-1] = true;
82
+ b = ChecaAlrededor(i+1, j-1, strPalabras, matBoggle, matbool, h+1);
83
+ if(b)
84
+ return true;
85
+ }
86
+
87
+ if(matbool[i][j+1] == false && matBoggle[i][j+1] == strPalabras[h])
88
+ {
89
+ if(h == strPalabras.length()-1)
90
+ {
91
+ return true;
92
+ }
93
+ //cout << 1 << endl;
94
+ matbool[i][j+1] = true;
95
+ b = ChecaAlrededor(i, j+1, strPalabras, matBoggle, matbool, h+1);
96
+ if(b)
97
+ return true;
98
+ }
99
+
100
+ if(matbool[i+1][j+1] == false && matBoggle[i+1][j+1] == strPalabras[h])
101
+ {
102
+ if(h == strPalabras.length()-1)
103
+ {
104
+ return true;
105
+ }
106
+ //cout << 2 << endl;
107
+ matbool[i+1][j+1] = true;
108
+ b = ChecaAlrededor(i+1, j+1, strPalabras, matBoggle, matbool, h+1);
109
+ if(b)
110
+ return true;
111
+ }
112
+
113
+ if(matbool[i+1][j] == false && matBoggle[i+1][j] == strPalabras[h])
114
+ {
115
+ if(h == strPalabras.length()-1)
116
+ {
117
+ return true;
118
+ }
119
+ //cout << 3 << endl;
120
+ matbool[i+1][j] = true;
121
+ b = ChecaAlrededor(i+1, j, strPalabras, matBoggle, matbool, h+1);
122
+ if(b)
123
+ return true;
124
+ }
125
+
126
+ if(matbool[i][j-1] == false && matBoggle[i][j-1] == strPalabras[h])
127
+ {
128
+ if(h == strPalabras.length()-1)
129
+ {
130
+ return true;
131
+ }
132
+ //cout << 4 << endl;
133
+ matbool[i][j-1] = true;
134
+ b = ChecaAlrededor(i, j-1, strPalabras, matBoggle, matbool, h+1);
135
+ if(b)
136
+ return true;
137
+ }
138
+
139
+ if(matbool[i-1][j-1] == false && matBoggle[i-1][j-1] == strPalabras[h])
140
+ {
141
+ if(h == strPalabras.length()-1)
142
+ {
143
+ return true;
144
+ }
145
+ //cout << 5 << endl;
146
+ matbool[i-1][j-1] = true;
147
+ b = ChecaAlrededor(i-1, j-1, strPalabras, matBoggle, matbool, h+1);
148
+ if(b)
149
+ return true;
150
+ }
151
+
152
+ if(matbool[i-1][j+1] == false && matBoggle[i-1][j+1] == strPalabras[h])
153
+ {
154
+ if(h == strPalabras.length()-1)
155
+ {
156
+ return true;
157
+ }
158
+ //cout << 6 << endl;
159
+ matbool[i-1][j+1] = true;
160
+ b = ChecaAlrededor(i-1, j+1, strPalabras, matBoggle, matbool, h+1);
161
+ if(b)
162
+ return true;
163
+ }
164
+
165
+ if(matbool[i-1][j] == false && matBoggle[i-1][j] == strPalabras[h])
166
+ {
167
+ if(h == strPalabras.length()-1)
168
+ {
169
+ return true;
170
+ }
171
+ //cout << 8 << endl;
172
+ matbool[i-1][j] = true;
173
+ b = ChecaAlrededor(i-1, j, strPalabras, matBoggle, matbool, h+1);
174
+ if(b)
175
+ return true;
176
+ }
177
+
178
+ if(matbool[i+1][j-1] == false && matBoggle[i+1][j-1] == strPalabras[h])
179
+ {
180
+ if(h == strPalabras.length()-1)
181
+ {
182
+ return true;
183
+ }
184
+ //cout << 7 << endl;
185
+ matbool[i+1][j-1] = true;
186
+ b = ChecaAlrededor(i+1, j-1, strPalabras, matBoggle, matbool, h+1);
187
+ if(b)
188
+ return true;
189
+ }
190
+
191
+ return false;
192
+ }
193
+
194
+ int main()
195
+ {
196
+ int h = 1, sum = 0, cantjuegos, juego = 1, cant = 0;
197
+ bool matbool[4][4], Existe = true, bContinue;
198
+ char matBoggle[4][4], letra;
199
+ string strPalabras;
200
+
201
+ for(int i=0; i < 4; i++)
202
+ {
203
+ for(int j=0; j < 4; j++)
204
+ {
205
+ matbool[i][j] = false;
206
+ }
207
+ }
208
+
209
+ cin >> cantjuegos;
210
+
211
+ for(int L = 0; L < cantjuegos; L++)
212
+ {
213
+ sum = 0;
214
+ cant = 0;
215
+ for(int i=0; i < 4; i++)
216
+ {
217
+ for(int j=0; j < 4; j++)
218
+ {
219
+ cin >> letra;
220
+ matBoggle[i][j] = letra;
221
+ }
222
+ }
223
+
224
+ cin >> cant;
225
+ for(int k = 0; k < cant; k++)
226
+ {
227
+ cin >> strPalabras;
228
+ bContinue = true;
229
+ for(int i = 0; i < 4 && bContinue; i++)
230
+ {
231
+ for(int j = 0; j < 4 && bContinue; j++)
232
+ {
233
+ if(matBoggle[i][j] == strPalabras[0])
234
+ {
235
+ h = 1;
236
+ matbool[i][j] = true;
237
+ Existe = ChecaAlrededor(i, j, strPalabras, matBoggle, matbool, h);
238
+ //cout << strPalabras<< " ";
239
+ if(Existe)
240
+ {
241
+ sum = Puntaje(strPalabras, sum);
242
+ bContinue = false;
243
+ //cout << sum;
244
+ }
245
+ //cout << endl;
246
+ for(int i = 0; i < 4; i++)
247
+ {
248
+ for(int j = 0; j < 4; j++)
249
+ {
250
+ matbool[i][j] = false;
251
+ }
252
+ }
253
+ bContinue = false;
254
+ }
255
+ }
256
+ }
257
+ }
258
+ cout << "Game " << juego << ": " << sum << endl;
259
+ juego++;
260
+ }
261
+ return 0;
262
+ }
data/martha.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.name = 'martha'
8
8
  spec.version = Martha::VERSION
9
9
  spec.authors = ['Victor Elizalde', 'Mauricio Cortes', 'Oscar Michel']
10
- spec.email = ['vic-bull@hotmail.com']
10
+ spec.email = ['vic-bull@hotmail.com', 'abmaury97@hotmail.com', 'oscarmichelh@gmail.com']
11
11
  spec.summary = 'A ruby gem to document code (Check github repo for specifications)'
12
12
  spec.description = 'A ruby gem to document code (Check github repo for specifications).'
13
13
  spec.homepage = 'https://github.com/VictorElizalde/Martha'
@@ -20,6 +20,16 @@ Gem::Specification.new do |spec|
20
20
  spec.bindir = 'bin'
21
21
  spec.executables = ['martha']
22
22
  spec.require_paths = ["lib"]
23
+ spec.required_ruby_version = ">= 2.0"
24
+
25
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
26
+ # delete this section to allow pushing this gem to any host.
27
+ #if spec.respond_to?(:metadata)
28
+ # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
29
+ #else
30
+ # raise 'RubyGems 2.0 or newer is required to \
31
+ # protect against public gem pushes.'
32
+ #end
23
33
 
24
34
  spec.add_development_dependency 'bundler', '~> 1.10'
25
35
  spec.add_development_dependency 'rake', '~> 10.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: martha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Elizalde
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-08-28 00:00:00.000000000 Z
13
+ date: 2016-08-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -113,16 +113,18 @@ dependencies:
113
113
  description: A ruby gem to document code (Check github repo for specifications).
114
114
  email:
115
115
  - vic-bull@hotmail.com
116
+ - abmaury97@hotmail.com
117
+ - oscarmichelh@gmail.com
116
118
  executables:
117
119
  - martha
118
120
  extensions: []
119
121
  extra_rdoc_files: []
120
122
  files:
121
- - ".DS_Store"
123
+ - ".gitignore"
124
+ - ".rspec"
122
125
  - ".travis.yml"
123
126
  - CODE_OF_CONDUCT.md
124
127
  - Gemfile
125
- - Gemfile.lock
126
128
  - LICENSE.txt
127
129
  - README.md
128
130
  - Rakefile
@@ -132,10 +134,8 @@ files:
132
134
  - lib/martha.rb
133
135
  - lib/martha/builder.rb
134
136
  - lib/martha/version.rb
137
+ - main.cpp
135
138
  - martha.gemspec
136
- - pkg/.DS_Store
137
- - pkg/martha-0.0.1.gem
138
- - pkg/martha-0.0.2.gem
139
139
  homepage: https://github.com/VictorElizalde/Martha
140
140
  licenses:
141
141
  - MIT
@@ -148,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - ">="
150
150
  - !ruby/object:Gem::Version
151
- version: '0'
151
+ version: '2.0'
152
152
  required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - ">="
data/.DS_Store DELETED
Binary file
data/Gemfile.lock DELETED
@@ -1,98 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- martha (0.0.2)
5
- thor
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- ast (2.3.0)
11
- axiom-types (0.1.1)
12
- descendants_tracker (~> 0.0.4)
13
- ice_nine (~> 0.11.0)
14
- thread_safe (~> 0.3, >= 0.3.1)
15
- codeclimate-engine-rb (0.3.1)
16
- virtus (~> 1.0)
17
- codeclimate-test-reporter (0.6.0)
18
- simplecov (>= 0.7.1, < 1.0.0)
19
- coderay (1.1.1)
20
- coercible (1.0.0)
21
- descendants_tracker (~> 0.0.1)
22
- descendants_tracker (0.0.4)
23
- thread_safe (~> 0.3, >= 0.3.1)
24
- diff-lcs (1.2.5)
25
- docile (1.1.5)
26
- equalizer (0.0.11)
27
- ice_nine (0.11.2)
28
- json (2.0.2)
29
- method_source (0.8.2)
30
- mini_portile2 (2.1.0)
31
- nokogiri (1.6.8)
32
- mini_portile2 (~> 2.1.0)
33
- pkg-config (~> 1.1.7)
34
- parser (2.3.1.2)
35
- ast (~> 2.2)
36
- pkg-config (1.1.7)
37
- powerpack (0.1.1)
38
- pry (0.10.4)
39
- coderay (~> 1.1.0)
40
- method_source (~> 0.8.1)
41
- slop (~> 3.4)
42
- rainbow (2.1.0)
43
- rake (10.5.0)
44
- reek (4.4.0)
45
- codeclimate-engine-rb (~> 0.3.1)
46
- parser (~> 2.3.1, >= 2.3.1.2)
47
- rainbow (~> 2.0)
48
- rspec (3.5.0)
49
- rspec-core (~> 3.5.0)
50
- rspec-expectations (~> 3.5.0)
51
- rspec-mocks (~> 3.5.0)
52
- rspec-core (3.5.2)
53
- rspec-support (~> 3.5.0)
54
- rspec-expectations (3.5.0)
55
- diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.5.0)
57
- rspec-mocks (3.5.0)
58
- diff-lcs (>= 1.2.0, < 2.0)
59
- rspec-support (~> 3.5.0)
60
- rspec-support (3.5.0)
61
- rubocop (0.42.0)
62
- parser (>= 2.3.1.1, < 3.0)
63
- powerpack (~> 0.1)
64
- rainbow (>= 1.99.1, < 3.0)
65
- ruby-progressbar (~> 1.7)
66
- unicode-display_width (~> 1.0, >= 1.0.1)
67
- ruby-progressbar (1.8.1)
68
- simplecov (0.12.0)
69
- docile (~> 1.1.0)
70
- json (>= 1.8, < 3)
71
- simplecov-html (~> 0.10.0)
72
- simplecov-html (0.10.0)
73
- slop (3.6.0)
74
- thor (0.19.1)
75
- thread_safe (0.3.5)
76
- unicode-display_width (1.1.0)
77
- virtus (1.0.5)
78
- axiom-types (~> 0.1)
79
- coercible (~> 1.0)
80
- descendants_tracker (~> 0.0, >= 0.0.3)
81
- equalizer (~> 0.0, >= 0.0.9)
82
-
83
- PLATFORMS
84
- ruby
85
-
86
- DEPENDENCIES
87
- bundler (~> 1.10)
88
- codeclimate-test-reporter
89
- martha!
90
- nokogiri
91
- pry
92
- rake (~> 10.0)
93
- reek
94
- rspec
95
- rubocop
96
-
97
- BUNDLED WITH
98
- 1.11.2
data/pkg/.DS_Store DELETED
Binary file
data/pkg/martha-0.0.1.gem DELETED
Binary file
data/pkg/martha-0.0.2.gem DELETED
Binary file