Commit 6e799cf1 authored by Emmanuel Godard's avatar Emmanuel Godard

add new NoGUI task

parent d8460438
Pipeline #2378 passed with stage
in 33 seconds
......@@ -24,4 +24,5 @@ build:
- ./gradlew clean
- ./gradlew downloadAndUnzipFile
- ./gradlew assemble
- ./gradlew helloNoX
......@@ -14,9 +14,14 @@ apply plugin: "application"
// Basic task to launch davis with appropriate arguments :
// -n <network> -i <id> -s <size> -al <algo>
task hello(type: Exec, group: "Application", description: "Run default Davis") {
commandLine 'davis-beta/bin/udavis','-n','src/RingAnon2AgentsSym.java','-i', 'RandomIds','-s', '18','-al', 'src/RandomWalkRing.java'
commandLine davisInstall + File.separator + 'davis-beta/bin/udavis','-n','src/RingAnon2AgentsSym.java','-i', 'RandomIds','-s', '18','-al', 'src/RandomWalkRing.java'
}
// Basic task to launch davis with appropriate arguments without GUI:
// -n <network> -i <id> -s <size> -al <algo>
task helloNoX(type: Exec, group: "Application", description: "Run default Davis without GUI") {
commandLine davisInstall + File.separator + 'davis-beta/bin/udavis-nogui','-n','src/RingAnon2AgentsSym.java','-i', 'RandomIds','-s', '18','-al', 'src/RandomWalkRing.java'
}
def davisFiles = "${projectDir}/davis-beta/"
println("${davisFiles}")
......
......@@ -11,7 +11,10 @@ public class RandomWalkRing extends RDVRingAgent {
}
public void randomWalk(Object board) {
if (random.nextBoolean()) goLeft();
else goRight();
if (random.nextBoolean()) {
goLeft();
} else if (random.nextBoolean()) {
goRight();
} else stay();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment