fek
15-03-2008, 12:58
Questo e' il codice incriminato:
public static PlayFieldDescriptor createForPlayerOne(Engine engine)
{
// TODO: REFACTOR THIS: Remove all hard coded values. This code has to be data-driven
// Place these values in a text file and create a PlayFieldDescriptor from there.
return new PlayFieldDescriptor(
new Point(20, 32),
new Point(292, 32),
new Point(291, 421),
new Point(20, 224),
WarningBox.createForPlayerOne(engine),
CounterBox.createForPlayerOne(engine),
CrushBox.getOriginForPlayerOne());
}
public static PlayFieldDescriptor createForPlayerTwo(Engine engine)
{
// TODO: REFACTOR THIS: Remove all hard coded values. This code has to be data-driven
// Place these values in a text file and create a PlayFieldDescriptor from there.
return new PlayFieldDescriptor(
new Point(524, 32),
new Point(476, 32),
new Point(419, 421),
new Point(524, 224),
WarningBox.createForPlayerTwo(engine),
CounterBox.createForPlayerTwo(engine),
CrushBox.getOriginForPlayerTwo());
}
Deve diventare qualcosa tipo:
public static PlayFieldDescriptor createForPlayerTwo(Engine engine)
{
return PlayFieldDescriptor.loadFrom(engine, "PlayerOne.txt");
}
Chi se ne occupa?
public static PlayFieldDescriptor createForPlayerOne(Engine engine)
{
// TODO: REFACTOR THIS: Remove all hard coded values. This code has to be data-driven
// Place these values in a text file and create a PlayFieldDescriptor from there.
return new PlayFieldDescriptor(
new Point(20, 32),
new Point(292, 32),
new Point(291, 421),
new Point(20, 224),
WarningBox.createForPlayerOne(engine),
CounterBox.createForPlayerOne(engine),
CrushBox.getOriginForPlayerOne());
}
public static PlayFieldDescriptor createForPlayerTwo(Engine engine)
{
// TODO: REFACTOR THIS: Remove all hard coded values. This code has to be data-driven
// Place these values in a text file and create a PlayFieldDescriptor from there.
return new PlayFieldDescriptor(
new Point(524, 32),
new Point(476, 32),
new Point(419, 421),
new Point(524, 224),
WarningBox.createForPlayerTwo(engine),
CounterBox.createForPlayerTwo(engine),
CrushBox.getOriginForPlayerTwo());
}
Deve diventare qualcosa tipo:
public static PlayFieldDescriptor createForPlayerTwo(Engine engine)
{
return PlayFieldDescriptor.loadFrom(engine, "PlayerOne.txt");
}
Chi se ne occupa?