sanichi-chess_icu 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/result.rb +7 -7
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/result.rb
CHANGED
@@ -15,7 +15,7 @@ three attributes must be supplied in the constructor.
|
|
15
15
|
result = ICU::Result.new(2, 10, 'W')
|
16
16
|
|
17
17
|
The above example represents player 10 winning in round 2. As it stands, it represends
|
18
|
-
a bye or walkover since there is no opponent. Without an opponent it is unrateable.
|
18
|
+
a bye or walkover since there is no opponent. Without an opponent, it is unrateable.
|
19
19
|
|
20
20
|
result.rateable # => false
|
21
21
|
|
@@ -24,16 +24,16 @@ We can fill in opponent details as follows:
|
|
24
24
|
result.opponent = 13
|
25
25
|
result.colour = 'B'
|
26
26
|
|
27
|
-
Specifying an opponent
|
27
|
+
Specifying an opponent always makes a result rateable.
|
28
28
|
|
29
29
|
result.rateable # => true
|
30
30
|
|
31
|
-
This result now represents a win with the black pieces over player number 13 in round 2.
|
32
|
-
Alternatively, all this
|
31
|
+
This result now represents a win by player 10 with the black pieces over player number 13 in round 2.
|
32
|
+
Alternatively, all this can been specified in the constructor.
|
33
33
|
|
34
34
|
result = ICU::Result.new(2, 10, 'W', :opponent => 13, :colour => 'B')
|
35
35
|
|
36
|
-
To make a game unratable, even it involves an opponent, set the _rateable_ atribute explicity:
|
36
|
+
To make a game unratable, even if it involves an opponent, set the _rateable_ atribute explicity:
|
37
37
|
|
38
38
|
result.rateable = false
|
39
39
|
|
@@ -53,7 +53,7 @@ which, with the above example, would be:
|
|
53
53
|
tluser.colour # => 'B'
|
54
54
|
tluser.round # => 2
|
55
55
|
|
56
|
-
The reversed result
|
56
|
+
The reversed result copies the _rateable_ attribute of the original unless an
|
57
57
|
explicit override is supplied.
|
58
58
|
|
59
59
|
result.rateable # => true
|
@@ -71,7 +71,7 @@ clear what is meant. For eample, the following would all be converted to _D_:
|
|
71
71
|
result.score = '='
|
72
72
|
result.score = '0.5'
|
73
73
|
|
74
|
-
The _points_ read-only accessor always returns a floating point number
|
74
|
+
The _points_ read-only accessor always returns a floating point number: either 0.0, 0.5 or 1.0.
|
75
75
|
|
76
76
|
=end
|
77
77
|
|