Advertisement
Coriic

Untitled

Nov 30th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. Coords2D pointedCoords = new Coords2D(((int)((t.getX())/15)), ((int)((t.getY())/15)));
  2. Map<Coords2D, BinaryState> structure = new HashMap<>();
  3. structure.put(pointedCoords, BinaryState.ALIVE);
  4. structure.put(new Coords2D(pointedCoords.x-1, pointedCoords.y), BinaryState.ALIVE);
  5. structure.put(new Coords2D(pointedCoords.x-2, pointedCoords.y), BinaryState.ALIVE);
  6. structure.put(new Coords2D(pointedCoords.x, pointedCoords.y-1), BinaryState.ALIVE);
  7. structure.put(new Coords2D(pointedCoords.x-1, pointedCoords.y-2), BinaryState.ALIVE);
  8. currentAutomaton.insertStructure(structure);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement