Move getCenteredOn to PartGrid.
This commit is contained in:
parent
d8d641ecf9
commit
53bab05798
@ -7,9 +7,9 @@ import com.codigoparallevar.minicards.types.Tuple2;
|
||||
public abstract class PartInstantiator {
|
||||
protected abstract Part instantiate(PartGrid grid, Tuple2<Integer, Integer> center);
|
||||
|
||||
public Part build(CanvasView canvasView) {
|
||||
Tuple2<Integer, Integer> center = canvasView.getCenteredOn();
|
||||
public Part build(PartGrid grid) {
|
||||
Tuple2<Integer, Integer> center = grid.getCenteredOn();
|
||||
|
||||
return instantiate(canvasView, center);
|
||||
return instantiate(grid, center);
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
package com.codigoparallevar.minicards.types;
|
||||
|
||||
import com.codigoparallevar.minicards.types.connectors.input.InputConnector;
|
||||
import com.codigoparallevar.minicards.types.connectors.input.SignalInputConnector;
|
||||
|
||||
public interface PartGrid {
|
||||
Selectable getPartOn(int x, int y);
|
||||
|
||||
SignalInputConnector getSignalInputConnectorOn(int x, int y);
|
||||
|
||||
Tuple2<Integer,Integer> getCenteredOn();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user