codebreaker_karolina 0.1.2 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/codebreaker_karolina-0.1.2.gem +0 -0
- data/codebreaker_karolina-0.1.3.gem +0 -0
- data/codebreaker_karolina-0.1.4.gem +0 -0
- data/lib/codebreaker_karolina/version.rb +1 -1
- data/lib/modules/db_yaml.rb +2 -0
- data/lib/modules/game.rb +1 -3
- data/lib/modules/user.rb +5 -9
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7453baca50feaa631814b88629ecd461c00a09ed14e3bd57da5ad842d8ddca36
|
4
|
+
data.tar.gz: 0e8567cb5e05658071c12af9c4f91c5828db7b4a39d446dd4a9d25f4f1ff788b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57f8fb6bd70d1bd16d6af68737c745a8b12d2b970f28e82c88479a26e7433f93fc9deb47126218ec2366c25da593e5ea608a01f566b6f5178fda56753d041ed9
|
7
|
+
data.tar.gz: 70d969087c130c05791bfeb42557b053f0d1b3da9635a0c3f3aa39254a1cefffb3d212880be144036303f453678716645982d9ee48ab326b7bfc8c0f9146d3c1
|
data/Gemfile.lock
CHANGED
Binary file
|
Binary file
|
Binary file
|
data/lib/modules/db_yaml.rb
CHANGED
data/lib/modules/game.rb
CHANGED
data/lib/modules/user.rb
CHANGED
@@ -1,22 +1,18 @@
|
|
1
1
|
class User
|
2
2
|
attr_accessor :used_attempts, :used_hints
|
3
|
+
attr_reader :name
|
3
4
|
|
4
|
-
def initialize
|
5
|
-
@used_attempts = 0
|
6
|
-
@used_hints = 0
|
7
|
-
end
|
8
|
-
|
9
|
-
def name(name)
|
5
|
+
def initialize(name)
|
10
6
|
return unless valid?(name)
|
11
7
|
|
12
8
|
@name = name
|
9
|
+
@used_attempts = 0
|
10
|
+
@used_hints = 0
|
13
11
|
end
|
14
12
|
|
15
13
|
private
|
16
14
|
|
17
15
|
def valid?(name)
|
18
|
-
|
19
|
-
|
20
|
-
false
|
16
|
+
!!name[/\A[A-Za-z0-9]{3,20}\z/]
|
21
17
|
end
|
22
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codebreaker_karolina
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- drkarolina
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fasterer
|
@@ -126,6 +126,9 @@ files:
|
|
126
126
|
- bin/setup
|
127
127
|
- codebreaker_karolina-0.1.0.gem
|
128
128
|
- codebreaker_karolina-0.1.1.gem
|
129
|
+
- codebreaker_karolina-0.1.2.gem
|
130
|
+
- codebreaker_karolina-0.1.3.gem
|
131
|
+
- codebreaker_karolina-0.1.4.gem
|
129
132
|
- lib/codebreaker_karolina.rb
|
130
133
|
- lib/codebreaker_karolina/version.rb
|
131
134
|
- lib/constants.rb
|