Selaa lähdekoodia

Added build.xml, because packages are difficult otherwise.

Add bin to .gitignore

    Initialize package on everything.
master
Josh Hofing 11 vuotta sitten
vanhempi
commit
107a0a464b
8 muutettua tiedostoa jossa 90 lisäystä ja 0 poistoa
  1. +2
    -0
      .gitignore
  2. +63
    -0
      build.xml
  3. +6
    -0
      src/Goldfish.java
  4. +2
    -0
      src/Grid.java
  5. +6
    -0
      src/Patch.java
  6. +2
    -0
      src/Render.java
  7. +7
    -0
      src/rules/Conway.java
  8. +2
    -0
      src/rules/RuleSet.java

+ 2
- 0
.gitignore Näytä tiedosto

@@ -1,5 +1,7 @@
*.class

bin/*

# Package Files #
*.jar
*.war


+ 63
- 0
build.xml Näytä tiedosto

@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="Goldfish">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<path id="Goldfish.classpath">
<pathelement location="bin"/>
</path>

<manifestclasspath property="manifest_cp" jarfile="bin/Goldfish.jar">
<classpath refid="Goldfish.classpath" />
</manifestclasspath>

<manifest file="bin/MANIFEST.MF">
<attribute name="Main-Class"
value="edu.stuy.goldfish.Goldfish" />
<attribute name="Created-By"
value="Ben Kurtovic, Josh Hofing, and Kevin Li" />
<attribute name="Class-Path"
value="${manifest_cp}" />
</manifest>


<target name="init">
<mkdir dir="bin"/>
<mkdir dir="src"/>
<mkdir dir="src/rules" />
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>

<target name="clean">
<delete dir="bin"/>
</target>

<target depends="clean" name="cleanall"/>
<target depends="build-project" name="build"/>

<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}" includeantruntime="false" >
<src path="src"/>
<classpath refid="Goldfish.classpath"/>
</javac>
<jar file="bin/Goldfish.jar"
manifest="bin/MANIFEST.MF" >
<fileset dir="bin">
<include name="**/*.class"/>
</fileset>
</jar>
</target>

<target depends="build-project" name="run">
<java jar="bin/${ant.project.name}.jar" fork="true" />
</target>

</project>

+ 6
- 0
src/Goldfish.java Näytä tiedosto

@@ -1,3 +1,8 @@
package edu.stuy.goldfish;


import edu.stuy.goldfish.rules.*;

public class Goldfish {

private Grid _grid;
@@ -10,5 +15,6 @@ public class Goldfish {

public static void main (String[] args) {
Goldfish g = new Goldfish();
Conway c = new Conway();
}
}

+ 2
- 0
src/Grid.java Näytä tiedosto

@@ -1,3 +1,5 @@
package edu.stuy.goldfish;

public class Grid {

private Patch[][] _grid;


+ 6
- 0
src/Patch.java Näytä tiedosto

@@ -1,3 +1,5 @@
package edu.stuy.goldfish;

public class Patch {
private int _pxcor, _pycor;
private String _plabel;
@@ -9,6 +11,10 @@ public class Patch {
_pycor = ycor;
}

public Patch () {
this(new Grid(), 0, 0);
}

public String toString() {
return _plabel;
}


+ 2
- 0
src/Render.java Näytä tiedosto

@@ -1,3 +1,5 @@
package edu.stuy.goldfish;


import java.awt.Color;



+ 7
- 0
src/rules/Conway.java Näytä tiedosto

@@ -1,2 +1,9 @@
package edu.stuy.goldfish.rules;

import edu.stuy.goldfish.Patch;
public class Conway extends RuleSet {

public Conway () {
Patch p = new Patch();
}
}

+ 2
- 0
src/rules/RuleSet.java Näytä tiedosto

@@ -1,2 +1,4 @@
package edu.stuy.goldfish.rules;

public class RuleSet {
}

Ladataan…
Peruuta
Tallenna