Connect-Four/src/events/Block.java
2018-04-16 13:40:41 +02:00

18 lines
348 B
Java

package events;
import board.IBoard;
import objects.Immovable;
public class Block extends RandomEvent {
@Override
public void act(IBoard b) {
int x = random.nextInt(b.getWidth());
b.drop(x, new Immovable());
}
@Override
public String announcement() {
return "An immovable object was placed.";
}
}