changeset 1:0c4412f878d5

add some files
author one
date Thu, 22 Nov 2012 16:40:37 +0900
parents 02f2667be72f
children cd80e302a3c4
files .classpath lib/Alice.jar src/codesegment/DPPTestAlice.java src/codesegment/PhilosophyCodeSegment.java src/codesegment/StartCodeSegment.java
diffstat 5 files changed, 76 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.classpath	Thu Nov 22 13:51:30 2012 +0900
+++ b/.classpath	Thu Nov 22 16:40:37 2012 +0900
@@ -6,5 +6,6 @@
 			<attribute name="owner.project.facets" value="java"/>
 		</attributes>
 	</classpathentry>
+	<classpathentry kind="lib" path="lib/Alice.jar"/>
 	<classpathentry kind="output" path="build/classes"/>
 </classpath>
Binary file lib/Alice.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/codesegment/DPPTestAlice.java	Thu Nov 22 16:40:37 2012 +0900
@@ -0,0 +1,14 @@
+package codesegment;
+
+public class DPPTestAlice {
+
+	public static void main(String[] args) {
+		System.out.println("Start DPPTestAlice");
+		
+		new StartCodeSegment().execute();
+		
+		
+	}
+	
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/codesegment/PhilosophyCodeSegment.java	Thu Nov 22 16:40:37 2012 +0900
@@ -0,0 +1,43 @@
+package codesegment;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+public class PhilosophyCodeSegment extends CodeSegment {
+
+	private final String name, leftFork, rightFork;
+	Receiver arg1 = ids.create(CommandType.TAKE);
+	Receiver arg2 = ids.create(CommandType.TAKE);
+	
+	public PhilosophyCodeSegment(String n,String lFork, String rFork) {
+		name = n;
+		leftFork = lFork;
+		rightFork = rFork;
+		arg1.setKey(leftFork);
+		arg2.setKey(rightFork);
+	}
+	
+	public String getName() {
+		return name;
+	}
+
+	public String getLeftFork() {
+		return leftFork;
+	}
+
+	public String getRightFork() {
+		return rightFork;
+	}
+
+	@Override
+	public void run() {
+		
+		
+		
+		
+	}
+	
+	
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/codesegment/StartCodeSegment.java	Thu Nov 22 16:40:37 2012 +0900
@@ -0,0 +1,18 @@
+package codesegment;
+
+import alice.codesegment.CodeSegment;
+
+public class StartCodeSegment extends CodeSegment {
+
+	@Override
+	public void run() {
+		System.out.println("run StartCodeSegment");
+		new PhilosophyCodeSegment("phil1","fork1","fork2");
+		ods.update("local", "fork1", 1);
+		ods.update("local", "fork2", 2);
+//		ods.update("local", "fork3", 3);
+//		ods.update("local", "fork4", 4);
+//		ods.update("local", "fork4", 4);
+	}
+
+}