Skip to content
Snippets Groups Projects
Commit 6e799cf1 authored by Emmanuel Godard's avatar Emmanuel Godard
Browse files

add new NoGUI task

parent d8460438
No related branches found
No related tags found
No related merge requests found
Pipeline #2378 passed
......@@ -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();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment