Browse files

[Druid::Game] initialized attribute to 0

Nowadays (in ng) not initializing something to 0 and then doing a
numeric comparison triggers an undefinedness warning.
  • Loading branch information...
1 parent 383fc26 commit 13bf2abee90a9f1cbb7a57ba626ce7763b5917a4 @masak committed Nov 9, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/Druid/Game.pm
View
1 lib/Druid/Game.pm
@@ -41,6 +41,7 @@ submethod BUILD(:$size = 3) {
@!heights = map { [ 0 xx $size ] }, ^$size;
@!colors = map { [ 0 xx $size ] }, ^$size;
$!player-to-move = 1;
+ $!moves-so-far = 0;
# RAKUDO: These attributes should be auto-initialized
$!size = $size;
}

0 comments on commit 13bf2ab

Please sign in to comment.