… | |
… | |
94 | |
94 | |
95 | for my $x (0 .. $arg{width} - 1) { |
95 | for my $x (0 .. $arg{width} - 1) { |
96 | for my $y (0 .. $arg{height} - 1) { |
96 | for my $y (0 .. $arg{height} - 1) { |
97 | my $ob = $map->[$x][$y] = cf::object::new "minesweeper-unknown"; |
97 | my $ob = $map->[$x][$y] = cf::object::new "minesweeper-unknown"; |
98 | $ob->name ("apply to try your luck or intelligence"); |
98 | $ob->name ("apply to try your luck or intelligence"); |
99 | Scalar::Util::weaken ($ob->{meta} = $self); |
99 | cf::weaken ($ob->{meta} = $self); |
100 | |
100 | |
101 | $ob->attach ("minesweeper_field"); |
101 | $ob->attach ("minesweeper_field"); |
102 | $ob->insert_ob_in_map_at ($self->map, undef, cf::INS_ABOVE_FLOOR_ONLY, |
102 | $ob->insert_ob_in_map_at ($self->map, undef, cf::INS_ABOVE_FLOOR_ONLY, |
103 | $self->x + $x, $self->y + $y); |
103 | $self->x + $x, $self->y + $y); |
104 | } |
104 | } |