@@ -0,0 +1,789 @@
+package j2048;%0A%0Apublic class SampleBadLogic implements TurnPerformer %7B%0A%0A%09@Override%0A%09public boolean turn(Direction direction, TileGameContext context) %7B%0A%09%09// This is an example of incorrect game logic.%0A%09%09//%0A%09%09// Instead of doing the correct action, this method doubles the value of%0A%09%09// any tiles that are not on the edge in the direction the user pressed.%0A%09%09//%0A%09%09// For example, if the user presses the right arrow, then all tiles%0A%09%09// except those on the right edge will double in value.%0A%09%09//%0A%09%09// This is obviously not the desired action.%0A%09%09final TileGrid grid = context.getGrid();%0A%09%09for (BoardLocation loc : grid.getAllOccupiedLocations()) %7B%0A%09%09%09Tile here = grid.at(loc);%0A%09%09%09if (loc.hasAdjacentLocation(direction)) %7B%0A%09%09%09%09here.setValue(here.getValue() * 2);%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return true;%0A%09%7D%0A%0A%7D%0A

Add sample bad logic