use traits::Cell;
use traits::Consumer;
use traits::Grid;
use traits::Engine;


pub struct Sequential<C: Cell, G: Grid<Cell=C>, Con: Consumer<Cell=C>> {
    grid: G,
    consumer: Con
}

impl<C: Cell, G: Grid<Cell=C>, Con: Consumer<Cell=C>> Sequential<C, G, Con> {

    pub fn new(grid: G, consumer: Con) -> Self {
        Sequential {
            grid: grid,
            consumer: consumer
        }
    }
}


impl<C: Cell, G: Grid<Cell=C>, Con: Consumer<Cell=C>> Engine for Sequential<C, G, Con> {
    fn run_times(&mut self, times: i64) {
        for _ in 0..times {
            self.grid.step();
            self.consumer.consume(&self.grid);
        }
    }
}
use traits::Grid;
use traits::Engine;
use traits::Consumer;


pub struct Sequential<G: Grid, C: Consumer> {
    grid: G,
    consumer: C
}

impl<G: Grid, C: Consumer> Sequential<G, C> {

    pub fn new(grid: G, consumer: C) -> Self {
        Sequential {
            grid: grid,
            consumer: consumer
        }
    }
}


impl<G: Grid, C: Consumer> Engine for Sequential<G, C> {
    fn run_times(&mut self, times: i64) {
        for _ in 0..times {
            self.grid.step();
            self.consumer.consume(&self.grid);
        }
    }
}
--- 
+++ 
@@ -1,16 +1,17 @@
+use traits::Cell;
+use traits::Consumer;
 use traits::Grid;
 use traits::Engine;
-use traits::Consumer;
 
 
-pub struct Sequential<G: Grid, C: Consumer> {
+pub struct Sequential<C: Cell, G: Grid<Cell=C>, Con: Consumer<Cell=C>> {
     grid: G,
-    consumer: C
+    consumer: Con
 }
 
-impl<G: Grid, C: Consumer> Sequential<G, C> {
+impl<C: Cell, G: Grid<Cell=C>, Con: Consumer<Cell=C>> Sequential<C, G, Con> {
 
-    pub fn new(grid: G, consumer: C) -> Self {
+    pub fn new(grid: G, consumer: Con) -> Self {
         Sequential {
             grid: grid,
             consumer: consumer
@@ -19,7 +20,7 @@
 }
 
 
-impl<G: Grid, C: Consumer> Engine for Sequential<G, C> {
+impl<C: Cell, G: Grid<Cell=C>, Con: Consumer<Cell=C>> Engine for Sequential<C, G, Con> {
     fn run_times(&mut self, times: i64) {
         for _ in 0..times {
             self.grid.step();
Support for the new constraint.
