From dcc70e17821f71303367064e47e40a4552e356bb Mon Sep 17 00:00:00 2001 From: TheLittleBoy Date: Sun, 29 Jun 2014 22:32:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BC=96=E5=86=99=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 代码中少写了一个空格,导致编译错误。 特此修正 --- source/chapter2/21_Protocols.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/chapter2/21_Protocols.md b/source/chapter2/21_Protocols.md index e1173fce..2913eb9a 100755 --- a/source/chapter2/21_Protocols.md +++ b/source/chapter2/21_Protocols.md @@ -230,7 +230,7 @@ class Dice { self.generator = generator } func roll() -> Int { - return Int(generator.random() * Double(sides)) +1 + return Int(generator.random() * Double(sides)) + 1 } } ```