view src/alice/test/dpp/codesegment/EatCodeSegment.java @ 6:b59c04a332a1

add PutForkCodeSegment
author one
date Sun, 25 Nov 2012 17:22:45 +0900 (2012-11-25)
parents 2db314b1a970
children bfaaebb50a2e
line wrap: on
line source
package alice.test.dpp.codesegment;

import alice.codesegment.CodeSegment;
import alice.test.dpp.model.Philosophy;

public class EatCodeSegment extends CodeSegment {

	Philosophy phil;
	public EatCodeSegment(Philosophy p) {
		phil = p;
	}
	
	@Override
	public void run() {
		System.out.println(phil.getName() + " is eating.");		
		new PutForkCodeSegment(phil);
	}
	
}