ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/minesweeper.ext
(Generate patch)

Comparing deliantra/server/ext/minesweeper.ext (file contents):
Revision 1.6 by root, Sun Sep 30 16:24:30 2007 UTC vs.
Revision 1.7 by root, Sun Jan 11 03:09:48 2009 UTC

106 106
107 # #tiles that need to be uncovered 107 # #tiles that need to be uncovered
108 $self->{todo} = $arg{width} * $arg{height} - $arg{bombs}; 108 $self->{todo} = $arg{width} * $arg{height} - $arg{bombs};
109 109
110 for (1 .. $arg{bombs}) { 110 for (1 .. $arg{bombs}) {
111 my $x = int rand $arg{width}; 111 my $x = cf::rndm $arg{width};
112 my $y = int rand $arg{height}; 112 my $y = cf::rndm $arg{height};
113 113
114 redo if $map->[$x][$y]{bomb}; 114 redo if $map->[$x][$y]{bomb};
115 115
116 $map->[$x][$y]{bomb} = 1; 116 $map->[$x][$y]{bomb} = 1;
117 } 117 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines