Skip to content

Instantly share code, notes, and snippets.

@Penagwin
Created February 5, 2014 20:01
Show Gist options
  • Save Penagwin/8831841 to your computer and use it in GitHub Desktop.
Save Penagwin/8831841 to your computer and use it in GitHub Desktop.
Game of life implemented in Java
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="IDEA IC-133.193" project-jdk-type="IDEA JDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Gameoflife.iml" filepath="$PROJECT_DIR$/Gameoflife.iml" />
</modules>
</component>
</project>
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
public class Cells {
public int x;
public int y;
public int a;
public Cells(int newx, int newy) { /* compiled code */ }
public Cells(int newx, int newy, int aa) { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
public class Changes {
public static java.util.ArrayList<Cells> changearr;
java.lang.String change;
Cells current;
public Changes() { /* compiled code */ }
public void change(Cells c, java.lang.String s) { /* compiled code */ }
public void set(java.util.ArrayList<Cells> ar) { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package com.intellij.uiDesigner.core;
public abstract class AbstractLayout implements java.awt.LayoutManager2 {
public static final int DEFAULT_HGAP = 10;
public static final int DEFAULT_VGAP = 5;
protected java.awt.Component[] myComponents;
protected com.intellij.uiDesigner.core.GridConstraints[] myConstraints;
protected java.awt.Insets myMargin;
private int myHGap;
private int myVGap;
private static final java.awt.Component[] COMPONENT_EMPTY_ARRAY;
public AbstractLayout() { /* compiled code */ }
public final java.awt.Insets getMargin() { /* compiled code */ }
public final int getHGap() { /* compiled code */ }
protected static int getHGapImpl(java.awt.Container container) { /* compiled code */ }
public final void setHGap(int hGap) { /* compiled code */ }
public final int getVGap() { /* compiled code */ }
protected static int getVGapImpl(java.awt.Container container) { /* compiled code */ }
public final void setVGap(int vGap) { /* compiled code */ }
public final void setMargin(java.awt.Insets margin) { /* compiled code */ }
final int getComponentCount() { /* compiled code */ }
final java.awt.Component getComponent(int index) { /* compiled code */ }
final com.intellij.uiDesigner.core.GridConstraints getConstraints(int index) { /* compiled code */ }
public void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints) { /* compiled code */ }
public final void addLayoutComponent(java.lang.String name, java.awt.Component comp) { /* compiled code */ }
public final void removeLayoutComponent(java.awt.Component comp) { /* compiled code */ }
public com.intellij.uiDesigner.core.GridConstraints getConstraintsForComponent(java.awt.Component comp) { /* compiled code */ }
private int getComponentIndex(java.awt.Component comp) { /* compiled code */ }
public final float getLayoutAlignmentX(java.awt.Container container) { /* compiled code */ }
public final float getLayoutAlignmentY(java.awt.Container container) { /* compiled code */ }
public abstract java.awt.Dimension maximumLayoutSize(java.awt.Container container);
public abstract void invalidateLayout(java.awt.Container container);
public abstract java.awt.Dimension preferredLayoutSize(java.awt.Container container);
public abstract java.awt.Dimension minimumLayoutSize(java.awt.Container container);
public abstract void layoutContainer(java.awt.Container container);
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package com.intellij.uiDesigner.core;
public abstract class DimensionInfo {
private final int[] myCell;
private final int[] mySpan;
protected final com.intellij.uiDesigner.core.LayoutState myLayoutState;
private final int[] myStretches;
private final int[] mySpansAfterElimination;
private final int[] myCellSizePolicies;
private final int myGap;
public DimensionInfo(com.intellij.uiDesigner.core.LayoutState layoutState, int gap) { /* compiled code */ }
public final int getComponentCount() { /* compiled code */ }
public final java.awt.Component getComponent(int componentIndex) { /* compiled code */ }
public final com.intellij.uiDesigner.core.GridConstraints getConstraints(int componentIndex) { /* compiled code */ }
public abstract int getCellCount();
public abstract int getPreferredWidth(int i);
public abstract int getMinimumWidth(int i);
public abstract com.intellij.uiDesigner.core.DimensionInfo getDimensionInfo(com.intellij.uiDesigner.core.GridLayoutManager gridLayoutManager);
public final int getCell(int componentIndex) { /* compiled code */ }
public final int getSpan(int componentIndex) { /* compiled code */ }
public final int getStretch(int cellIndex) { /* compiled code */ }
protected abstract int getOriginalCell(com.intellij.uiDesigner.core.GridConstraints gridConstraints);
protected abstract int getOriginalSpan(com.intellij.uiDesigner.core.GridConstraints gridConstraints);
abstract int getSizePolicy(int i);
abstract int getChildLayoutCellCount(com.intellij.uiDesigner.core.GridLayoutManager gridLayoutManager);
public final int getGap() { /* compiled code */ }
public boolean componentBelongsCell(int componentIndex, int cellIndex) { /* compiled code */ }
public final int getCellSizePolicy(int cellIndex) { /* compiled code */ }
private int getCellSizePolicyImpl(int cellIndex, java.util.ArrayList eliminatedCells) { /* compiled code */ }
private int calcCellSizePolicy(int cellIndex) { /* compiled code */ }
private int getCellSizePolicyFromInheriting(int cellIndex) { /* compiled code */ }
public static java.awt.Container findAlignedChild(java.awt.Component child, com.intellij.uiDesigner.core.GridConstraints c) { /* compiled code */ }
protected final java.awt.Dimension getPreferredSize(int componentIndex) { /* compiled code */ }
protected final java.awt.Dimension getMinimumSize(int componentIndex) { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package com.intellij.uiDesigner.core;
public final class GridConstraints implements java.lang.Cloneable {
public static final com.intellij.uiDesigner.core.GridConstraints[] EMPTY_ARRAY;
public static final int FILL_NONE = 0;
public static final int FILL_HORIZONTAL = 1;
public static final int FILL_VERTICAL = 2;
public static final int FILL_BOTH = 3;
public static final int ANCHOR_CENTER = 0;
public static final int ANCHOR_NORTH = 1;
public static final int ANCHOR_SOUTH = 2;
public static final int ANCHOR_EAST = 4;
public static final int ANCHOR_WEST = 8;
public static final int ANCHOR_NORTHEAST = 5;
public static final int ANCHOR_SOUTHEAST = 6;
public static final int ANCHOR_SOUTHWEST = 10;
public static final int ANCHOR_NORTHWEST = 9;
public static final int SIZEPOLICY_FIXED = 0;
public static final int SIZEPOLICY_CAN_SHRINK = 1;
public static final int SIZEPOLICY_CAN_GROW = 2;
public static final int SIZEPOLICY_WANT_GROW = 4;
public static final int ALIGN_LEFT = 0;
public static final int ALIGN_CENTER = 1;
public static final int ALIGN_RIGHT = 2;
public static final int ALIGN_FILL = 3;
private int myRow;
private int myColumn;
private int myRowSpan;
private int myColSpan;
private int myVSizePolicy;
private int myHSizePolicy;
private int myFill;
private int myAnchor;
public final java.awt.Dimension myMinimumSize;
public final java.awt.Dimension myPreferredSize;
public final java.awt.Dimension myMaximumSize;
private int myIndent;
private boolean myUseParentLayout;
public GridConstraints() { /* compiled code */ }
public GridConstraints(int row, int column, int rowSpan, int colSpan, int anchor, int fill, int HSizePolicy, int VSizePolicy, java.awt.Dimension minimumSize, java.awt.Dimension preferredSize, java.awt.Dimension maximumSize) { /* compiled code */ }
public GridConstraints(int row, int column, int rowSpan, int colSpan, int anchor, int fill, int HSizePolicy, int VSizePolicy, java.awt.Dimension minimumSize, java.awt.Dimension preferredSize, java.awt.Dimension maximumSize, int indent) { /* compiled code */ }
public GridConstraints(int row, int column, int rowSpan, int colSpan, int anchor, int fill, int HSizePolicy, int VSizePolicy, java.awt.Dimension minimumSize, java.awt.Dimension preferredSize, java.awt.Dimension maximumSize, int indent, boolean useParentLayout) { /* compiled code */ }
public java.lang.Object clone() { /* compiled code */ }
public int getColumn() { /* compiled code */ }
public void setColumn(int column) { /* compiled code */ }
public int getRow() { /* compiled code */ }
public void setRow(int row) { /* compiled code */ }
public int getRowSpan() { /* compiled code */ }
public void setRowSpan(int rowSpan) { /* compiled code */ }
public int getColSpan() { /* compiled code */ }
public void setColSpan(int colSpan) { /* compiled code */ }
public int getHSizePolicy() { /* compiled code */ }
public void setHSizePolicy(int sizePolicy) { /* compiled code */ }
public int getVSizePolicy() { /* compiled code */ }
public void setVSizePolicy(int sizePolicy) { /* compiled code */ }
public int getAnchor() { /* compiled code */ }
public void setAnchor(int anchor) { /* compiled code */ }
public int getFill() { /* compiled code */ }
public void setFill(int fill) { /* compiled code */ }
public int getIndent() { /* compiled code */ }
public void setIndent(int indent) { /* compiled code */ }
public boolean isUseParentLayout() { /* compiled code */ }
public void setUseParentLayout(boolean useParentLayout) { /* compiled code */ }
public com.intellij.uiDesigner.core.GridConstraints store() { /* compiled code */ }
public void restore(com.intellij.uiDesigner.core.GridConstraints constraints) { /* compiled code */ }
public boolean equals(java.lang.Object o) { /* compiled code */ }
public int hashCode() { /* compiled code */ }
public int getCell(boolean isRow) { /* compiled code */ }
public void setCell(boolean isRow, int value) { /* compiled code */ }
public int getSpan(boolean isRow) { /* compiled code */ }
public void setSpan(boolean isRow, int value) { /* compiled code */ }
public boolean contains(boolean isRow, int cell) { /* compiled code */ }
public java.lang.String toString() { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package com.intellij.uiDesigner.core;
public final class GridLayoutManager extends com.intellij.uiDesigner.core.AbstractLayout {
private int myMinCellSize;
private final int[] myRowStretches;
private final int[] myColumnStretches;
private final int[] myYs;
private final int[] myHeights;
private final int[] myXs;
private final int[] myWidths;
private com.intellij.uiDesigner.core.LayoutState myLayoutState;
com.intellij.uiDesigner.core.DimensionInfo myHorizontalInfo;
com.intellij.uiDesigner.core.DimensionInfo myVerticalInfo;
private boolean mySameSizeHorizontally;
private boolean mySameSizeVertically;
public static java.lang.Object DESIGN_TIME_INSETS;
private static final int SKIP_ROW = 1;
private static final int SKIP_COL = 2;
public GridLayoutManager(int rowCount, int columnCount) { /* compiled code */ }
public GridLayoutManager(int rowCount, int columnCount, java.awt.Insets margin, int hGap, int vGap) { /* compiled code */ }
public GridLayoutManager(int rowCount, int columnCount, java.awt.Insets margin, int hGap, int vGap, boolean sameSizeHorizontally, boolean sameSizeVertically) { /* compiled code */ }
public void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints) { /* compiled code */ }
public int getRowCount() { /* compiled code */ }
public int getColumnCount() { /* compiled code */ }
public int getRowStretch(int rowIndex) { /* compiled code */ }
public void setRowStretch(int rowIndex, int stretch) { /* compiled code */ }
public int getColumnStretch(int columnIndex) { /* compiled code */ }
public void setColumnStretch(int columnIndex, int stretch) { /* compiled code */ }
public java.awt.Dimension maximumLayoutSize(java.awt.Container target) { /* compiled code */ }
public java.awt.Dimension minimumLayoutSize(java.awt.Container container) { /* compiled code */ }
private static void makeSameSizes(int[] widths) { /* compiled code */ }
private static int[] getSameSizes(com.intellij.uiDesigner.core.DimensionInfo info, int totalWidth) { /* compiled code */ }
public java.awt.Dimension preferredLayoutSize(java.awt.Container container) { /* compiled code */ }
private static int sum(int[] ints) { /* compiled code */ }
private java.awt.Dimension getTotalGap(java.awt.Container container, com.intellij.uiDesigner.core.DimensionInfo hInfo, com.intellij.uiDesigner.core.DimensionInfo vInfo) { /* compiled code */ }
private static int getDesignTimeInsets(java.awt.Container container) { /* compiled code */ }
private static java.awt.Insets getInsets(java.awt.Container container) { /* compiled code */ }
private static int countGap(com.intellij.uiDesigner.core.DimensionInfo info, int startCell, int cellCount) { /* compiled code */ }
private static boolean shouldAddGapAfterCell(com.intellij.uiDesigner.core.DimensionInfo info, int cellIndex) { /* compiled code */ }
private static boolean isCellEmpty(com.intellij.uiDesigner.core.DimensionInfo info, int cellIndex) { /* compiled code */ }
public void layoutContainer(java.awt.Container container) { /* compiled code */ }
private int checkSetSizesFromParent(java.awt.Container container, java.awt.Insets insets) { /* compiled code */ }
public void invalidateLayout(java.awt.Container container) { /* compiled code */ }
void validateInfos(java.awt.Container container) { /* compiled code */ }
public int[] getXs() { /* compiled code */ }
public int[] getWidths() { /* compiled code */ }
public int[] getYs() { /* compiled code */ }
public int[] getHeights() { /* compiled code */ }
public int[] getCoords(boolean isRow) { /* compiled code */ }
public int[] getSizes(boolean isRow) { /* compiled code */ }
private int[] getMinSizes(com.intellij.uiDesigner.core.DimensionInfo info) { /* compiled code */ }
private int[] getPrefSizes(com.intellij.uiDesigner.core.DimensionInfo info) { /* compiled code */ }
private int[] getMinOrPrefSizes(com.intellij.uiDesigner.core.DimensionInfo info, boolean min) { /* compiled code */ }
private static void updateSizesFromChildren(com.intellij.uiDesigner.core.DimensionInfo info, boolean min, int[] widths) { /* compiled code */ }
private static void updateSizesFromChild(com.intellij.uiDesigner.core.DimensionInfo info, boolean min, int[] widths, java.awt.Container container, int childIndex) { /* compiled code */ }
private static int getMin2(com.intellij.uiDesigner.core.DimensionInfo info, int componentIndex) { /* compiled code */ }
private void new_doIt(int[] widths, int cell, int span, int minWidth, com.intellij.uiDesigner.core.DimensionInfo info, boolean checkPrefs) { /* compiled code */ }
private static void distribute(boolean[] higherPriorityCells, com.intellij.uiDesigner.core.DimensionInfo info, int toDistribute, int[] widths) { /* compiled code */ }
private void getCellsWithHigherPriorities(com.intellij.uiDesigner.core.DimensionInfo info, boolean[] allowedCells, boolean[] higherPriorityCells, boolean checkPrefs, int[] widths) { /* compiled code */ }
public boolean isSameSizeHorizontally() { /* compiled code */ }
public boolean isSameSizeVertically() { /* compiled code */ }
public void setSameSizeHorizontally(boolean sameSizeHorizontally) { /* compiled code */ }
public void setSameSizeVertically(boolean sameSizeVertically) { /* compiled code */ }
public int[] getHorizontalGridLines() { /* compiled code */ }
public int[] getVerticalGridLines() { /* compiled code */ }
public int getCellCount(boolean isRow) { /* compiled code */ }
public int getCellSizePolicy(boolean isRow, int cellIndex) { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package com.intellij.uiDesigner.core;
final class HorizontalInfo extends com.intellij.uiDesigner.core.DimensionInfo {
public HorizontalInfo(com.intellij.uiDesigner.core.LayoutState layoutState, int gap) { /* compiled code */ }
protected int getOriginalCell(com.intellij.uiDesigner.core.GridConstraints constraints) { /* compiled code */ }
protected int getOriginalSpan(com.intellij.uiDesigner.core.GridConstraints constraints) { /* compiled code */ }
int getSizePolicy(int componentIndex) { /* compiled code */ }
int getChildLayoutCellCount(com.intellij.uiDesigner.core.GridLayoutManager childLayout) { /* compiled code */ }
public int getMinimumWidth(int componentIndex) { /* compiled code */ }
public com.intellij.uiDesigner.core.DimensionInfo getDimensionInfo(com.intellij.uiDesigner.core.GridLayoutManager grid) { /* compiled code */ }
public int getCellCount() { /* compiled code */ }
public int getPreferredWidth(int componentIndex) { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package com.intellij.uiDesigner.core;
public final class LayoutState {
private final java.awt.Component[] myComponents;
private final com.intellij.uiDesigner.core.GridConstraints[] myConstraints;
private final int myColumnCount;
private final int myRowCount;
final java.awt.Dimension[] myPreferredSizes;
final java.awt.Dimension[] myMinimumSizes;
public LayoutState(com.intellij.uiDesigner.core.GridLayoutManager layout, boolean ignoreInvisibleComponents) { /* compiled code */ }
public int getComponentCount() { /* compiled code */ }
public java.awt.Component getComponent(int index) { /* compiled code */ }
public com.intellij.uiDesigner.core.GridConstraints getConstraints(int index) { /* compiled code */ }
public int getColumnCount() { /* compiled code */ }
public int getRowCount() { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package com.intellij.uiDesigner.core;
public class Spacer extends javax.swing.JComponent {
public Spacer() { /* compiled code */ }
public java.awt.Dimension getMinimumSize() { /* compiled code */ }
public final java.awt.Dimension getPreferredSize() { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package com.intellij.uiDesigner.core;
public final class SupportCode {
public SupportCode() { /* compiled code */ }
public static com.intellij.uiDesigner.core.SupportCode.TextWithMnemonic parseText(java.lang.String textWithMnemonic) { /* compiled code */ }
public static void setDisplayedMnemonicIndex(javax.swing.JComponent component, int index) { /* compiled code */ }
public static final class TextWithMnemonic {
public final java.lang.String myText;
public final int myMnemonicIndex;
private TextWithMnemonic(java.lang.String text, int index) { /* compiled code */ }
public char getMnemonicChar() { /* compiled code */ }
}
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package com.intellij.uiDesigner.core;
public final class Util {
private static final java.awt.Dimension MAX_SIZE;
public static final int DEFAULT_INDENT = 10;
public Util() { /* compiled code */ }
public static java.awt.Dimension getMinimumSize(java.awt.Component component, com.intellij.uiDesigner.core.GridConstraints constraints, boolean addIndent) { /* compiled code */ }
public static java.awt.Dimension getMaximumSize(java.awt.Component component, com.intellij.uiDesigner.core.GridConstraints constraints, boolean addIndent) { /* compiled code */ }
public static java.awt.Dimension getPreferredSize(java.awt.Component component, com.intellij.uiDesigner.core.GridConstraints constraints, boolean addIndent) { /* compiled code */ }
private static java.awt.Dimension getSize(java.awt.Dimension overridenSize, java.awt.Dimension ownSize) { /* compiled code */ }
public static void adjustSize(java.awt.Component component, com.intellij.uiDesigner.core.GridConstraints constraints, java.awt.Dimension size) { /* compiled code */ }
public static int eliminate(int[] cellIndices, int[] spans, java.util.ArrayList elimitated) { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package com.intellij.uiDesigner.core;
final class VerticalInfo extends com.intellij.uiDesigner.core.DimensionInfo {
public VerticalInfo(com.intellij.uiDesigner.core.LayoutState layoutState, int gap) { /* compiled code */ }
protected int getOriginalCell(com.intellij.uiDesigner.core.GridConstraints constraints) { /* compiled code */ }
protected int getOriginalSpan(com.intellij.uiDesigner.core.GridConstraints constraints) { /* compiled code */ }
int getSizePolicy(int componentIndex) { /* compiled code */ }
int getChildLayoutCellCount(com.intellij.uiDesigner.core.GridLayoutManager childLayout) { /* compiled code */ }
public int getMinimumWidth(int componentIndex) { /* compiled code */ }
public com.intellij.uiDesigner.core.DimensionInfo getDimensionInfo(com.intellij.uiDesigner.core.GridLayoutManager grid) { /* compiled code */ }
public int getCellCount() { /* compiled code */ }
public int getPreferredWidth(int componentIndex) { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
public class Display {
int width;
int height;
boolean there;
int therea;
public static java.util.ArrayList<Cells> cells;
public static java.util.ArrayList<Cells> debug;
public Display() { /* compiled code */ }
public void write() { /* compiled code */ }
public void debug() { /* compiled code */ }
public static void print(java.lang.Object s) { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
public class DisplayGUI {
private javax.swing.JButton X;
public DisplayGUI() { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
public class ReadFile {
java.io.FileInputStream file;
int r;
public int x;
public int y;
java.lang.String hnext;
public ReadFile() { /* compiled code */ }
public void run(Display d) throws java.io.IOException { /* compiled code */ }
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
public class Run {
public Run() { /* compiled code */ }
public static void main(java.lang.String[] args) throws java.io.IOException, java.lang.CloneNotSupportedException { /* compiled code */ }
public static void add(int row, int col, Display d) { /* compiled code */ }
}
GIF89a����������������������������3f���3333f3�3�3�ff3fff�f�f���3�f��������3�f̙������3�f������3333f3�3�3�3333333f33�33�33�3f3f33ff3f�3f�3f�3�3�33�f3��3��3��3�3�33�f3̙3��3��3�3�33�f3��3��3��ff3fff�f�f�f3f33f3ff3�f3�f3�ffff3fffff�ff�ff�f�f�3f�ff��f��f��f�f�3f�ff̙f��f��f�f�3f�ff��f��f����3�f���̙��3�33�3f�3��3̙3��f�f3�ff�f��f̙f�����3��f�����̙������3��f�̙��̙������3��f�����̙����3�f�������3�33�3f�3��3��3��f�f3�ff�f��f��f�̙̙3̙f̙�̙�̙�����3��f�̙����������3��f�����������3�f�������3�33�3f�3��3��3��f�f3�ff�f��f��f�����3��f�������������3��f�̙����������3��f���������!�,8H��@*Txp�C� .�(1!Ŋ.V�(��C�AN|��!ɒO�iҠK�;
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
public class Cells {
public int x;
public int y;
public Cells(int i, int i1) { /* compiled code */ }
}
/**
* Created by penagwin on 2/3/14.
*/
public class Cells {
public Cells(int newx, int newy) {
x = newx;
y = newy;
a=0;
}
public Cells(int newx, int newy, int aa) {
x = newx;
y = newy;
a=aa;
}
public int x,y, a;
}
import java.util.ArrayList;
/**
* Created by penagwin on 2/4/14.
*/
public class Changes {
public static ArrayList<Cells> changearr = new ArrayList<Cells>();
String change;
Cells current;
public void change(Cells c, String s) {
change=s;
current=c;
//changearr.add(this);
}
public void set(ArrayList<Cells> ar){
changearr = ar;
}
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
public class Display {
int width;
int height;
boolean there;
public static java.util.ArrayList<Cells> cells;
public Display() { /* compiled code */ }
public void write() { /* compiled code */ }
public static void print(java.lang.Object o) { /* compiled code */ }
}
//Layman terms 2,147,483,639 penguins. (That requires 8 GB of ram for the indexes alone.)
import java.util.ArrayList;
public class Display {
//Init Vars
//Width and height are the number of characters that it will display
int width = 10;
int height = 10;
private boolean there = false;
private int therea = -2;
public static ArrayList<Cells> cells = new ArrayList<Cells>();
public static ArrayList<Cells> debug = new ArrayList<Cells>();
//Writing to the screen
public void write() {
print("\n");
for (int col = 0; col < height - 1; col++) {
for (int row = 0; row <= width; row++) {
//Loop through all penguins
for (Cells cell : cells) {
if (cell.y == col && cell.x == row) {
there = true;
}
}
if (there) {
print("X");
there = false;
} else {
print(".");
}
}
print("\n");
}
}
public void debug() {
print("\n");
for (int col = 0; col < height - 1; col++) {
for (int row = 0; row <= width; row++) {
//Loop through all penguins
for (Cells cell : debug) {
if (cell.y == col && cell.x == row) {
therea = cell.a;
}
}
if (therea==0) {
print("X");
therea = -2;
}else if (therea == 1) {
print("O");
therea = -2;
} else {
print(".");
}
}
print("\n");
}
debug.clear();
}
//'Cause I am lazy :P
private static void print(Object s) {
System.out.print(s);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="DisplayGUI">
<grid id="27dc6" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="f9c75" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="a8ec2" class="javax.swing.JButton" binding="X">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="X"/>
</properties>
</component>
<hspacer id="71111">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
</children>
</grid>
<hspacer id="b236b">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<vspacer id="cd62d">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
</children>
</grid>
</form>
import javax.swing.*;
import java.awt.*;
/**
* Created by penagwin on 2/4/14.
*/
public class DisplayGUI {
private JButton X;
public DisplayGUI() {
//1. Create the frame.
}
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
public class ReadFile {
java.util.Scanner file;
int x;
int y;
java.lang.String hnext;
public ReadFile() { /* compiled code */ }
public void run(Display display) { /* compiled code */ }
}
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;
/**
* Created by penagwin on 2/3/14.
*/
public class ReadFile {
FileInputStream file;
int r;
public int x, y = 0;
String hnext = "";
public void run(Display d) throws IOException {
FileInputStream file = new FileInputStream("cells.txt");
while ((r = file.read()) != -1) {
char c = (char)r;
if (String.valueOf(c).equals("\n")) {
y++;
x = 0;
} else {
if (String.valueOf(c).equals("X")) {
d.cells.add(new Cells(x, y));
}
x++;
}
}
}
}
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
public class Run {
public Run() { /* compiled code */ }
public static void main(java.lang.String[] strings) { /* compiled code */ }
}
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Created by penagwin on 2/3/14.
*/
public class Run {
public static void main(String[] args) throws IOException, CloneNotSupportedException {
Display d = new Display();
Cells last = new Cells(0, 0);
ReadFile read = new ReadFile();
read.run(d);
d.write();
int neighbors;
ArrayList<Cells> clone = new ArrayList<Cells>(d.cells.size());
clone.clear();
for (Cells item : d.cells) clone.add(item);
for (int row = 0; row <= d.width; row++) {
for (int col = 0; col < d.height - 1; col++) {
neighbors = 0;
for (Cells celli : d.cells) {
if (celli.y == col - 1 && celli.x == row) {
add(celli.x, celli.y, d);
neighbors++;
}
if (celli.y == col - 1 && celli.x == row + 1) {
add(celli.x, celli.y, d);
neighbors++;
}
if (celli.y == col - 1 && celli.x == row - 1) {
add(celli.x, celli.y, d);
neighbors++;
}
if (celli.y == col && celli.x == row + 1) {
add(celli.x, celli.y, d);
neighbors++;
}
if (celli.y == col && celli.x == row - 1) {
add(celli.x, celli.y, d);
neighbors++;
}
if (celli.y == col + 1 && celli.x == row + 1) {
add(celli.x, celli.y, d);
neighbors++;
}
if (celli.y == col + 1 && celli.x == row - 1) {
add(celli.x, celli.y, d);
neighbors++;
}
if (celli.y == col + 1 && celli.x == row) {
add(celli.x, celli.y, d);
neighbors++;
}
if (celli.y == col && celli.x == row) {
last = celli;
}
}//row 6 col 1
if (row == 6 && col == 2) {
d.debug.add(new Cells(row, col, 1));
d.debug();
}
if (neighbors != 0)
System.out.println(neighbors);
if (neighbors == 3) {
clone.add(new Cells(row, col));
}
if (neighbors < 2) {
clone.remove(last);
}
if (neighbors > 3) {
clone.remove(last);
}
}
}
d.cells.clear();
for (Cells item : clone) d.cells.add(item);
d.write();
}
public static void add(int row, int col, Display d) {
d.debug.add(new Cells(row, col));
}
}
GIF89a����������������������������3f���3333f3�3�3�ff3fff�f�f���3�f��������3�f̙������3�f������3333f3�3�3�3333333f33�33�33�3f3f33ff3f�3f�3f�3�3�33�f3��3��3��3�3�33�f3̙3��3��3�3�33�f3��3��3��ff3fff�f�f�f3f33f3ff3�f3�f3�ffff3fffff�ff�ff�f�f�3f�ff��f��f��f�f�3f�ff̙f��f��f�f�3f�ff��f��f����3�f���̙��3�33�3f�3��3̙3��f�f3�ff�f��f̙f�����3��f�����̙������3��f�̙��̙������3��f�����̙����3�f�������3�33�3f�3��3��3��f�f3�ff�f��f��f�̙̙3̙f̙�̙�̙�����3��f�̙����������3��f�����������3�f�������3�33�3f�3��3��3��f�f3�ff�f��f��f�����3��f�������������3��f�̙����������3��f���������!�,8H��@*Txp�C� .�(1!Ŋ.V�(��C�AN|��!ɒO�iҠK�;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment