If they only differ in the values of their members, inheritance seems somewhat pointless in any case. But having 2 unrelated classes would be worse.
How about something like this?
class SomeClass
{
int xPosition, yPosition;
enum Type
{
Boat, Mine
}
public SomeClass(Type type)
{
if (type == Type.Boat)
{
xPosition = 3;
yPosition = 4;
}
else
{
xPosition = 1;
yPosition = 1;
}
// assign 'type' to a class variable here if required
}
}
Construct using:
new SomeClass(SomeClass.Type.Boat)
or:
new SomeClass(SomeClass.Type.Mine)
You may want to pick a better name than SomeClass
.