소스 검색

RuleSet is now an interface, and Conway has placeholder code.

master
Josh Hofing 11 년 전
부모
커밋
4c273a9805
2개의 변경된 파일13개의 추가작업 그리고 6개의 파일을 삭제
  1. +8
    -1
      src/rules/Conway.java
  2. +5
    -5
      src/rules/RuleSet.java

+ 8
- 1
src/rules/Conway.java 파일 보기

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

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

public class Conway implements RuleSet {

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

@Override
public static Grid run (Grid g) {
return g; //TODO: do stuff.
}
}

+ 5
- 5
src/rules/RuleSet.java 파일 보기

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

import edu.stuy.goldfish.Grid;

public class RuleSet {
public interface RuleSet {

/**
* Run this ruleset on a grid, returning the result.
*
* @param g The grid this is running on
*
* @return
* @return The new grid
*/
public static Grid run (Grid g) {
return g;
}
public static Grid run (Grid g);
}

불러오는 중...
취소
저장