/* Copyright 2001 Michael R. Wick */ package Strategies; import java.awt.Canvas; import java.awt.Dimension; import java.awt.Point; import java.awt.Color; import java.awt.Graphics; import Shapes.*; import java.util.*; public class GeneralShapeMutationStrategy extends ShapeMutationStrategy { public GeneralShapeMutationStrategy(int w) { super(w); } public void mutate( Shape s ) { s.translateTo( new Point( r.nextInt(0,width) , r.nextInt(0,width) ) ); } }