From 4c273a980566d08aa347fea703ec9d7120140e87 Mon Sep 17 00:00:00 2001 From: Josh Hofing Date: Mon, 14 Jan 2013 09:41:23 -0500 Subject: [PATCH] RuleSet is now an interface, and Conway has placeholder code. --- src/rules/Conway.java | 9 ++++++++- src/rules/RuleSet.java | 10 +++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/rules/Conway.java b/src/rules/Conway.java index 9daae4b..22cd1b2 100644 --- a/src/rules/Conway.java +++ b/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. + } } diff --git a/src/rules/RuleSet.java b/src/rules/RuleSet.java index a6263a5..df8d585 100644 --- a/src/rules/RuleSet.java +++ b/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); + + }