From: jzhou Date: Fri, 5 Sep 2008 03:08:56 +0000 (+0000) Subject: changes X-Git-Tag: buildscript^6~39 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9e877be89bc47c9cf382e4ce6825a9e19c8ebff3;p=IRC.git changes --- diff --git a/Robust/src/Benchmarks/MMG/Java/Ghost.java b/Robust/src/Benchmarks/MMG/Java/Ghost.java index b842d306..83342983 100755 --- a/Robust/src/Benchmarks/MMG/Java/Ghost.java +++ b/Robust/src/Benchmarks/MMG/Java/Ghost.java @@ -322,8 +322,23 @@ public class Ghost { } public void doMove() { - this.m_locX += this.m_dx; - this.m_locY += this.m_dy; + if((this.m_dx == -1) && (this.m_locX == 0)) { + // go left and currently this.m_locX is 0 + this.m_locX = this.m_map.m_nrofblocks - 1; + } else if((this.m_dx == 1) && (this.m_locX == this.m_map.m_nrofblocks - 1)) { + this.m_locX = 0; + } else { + this.m_locX += this.m_dx; + } + + if((this.m_dy == -1) && (this.m_locY == 0)) { + // go up and currently this.m_locY is 0 + this.m_locY = this.m_map.m_nrofblocks - 1; + } else if((this.m_dy == 1) && (this.m_locY == this.m_map.m_nrofblocks - 1)) { + this.m_locY = 0; + } else { + this.m_locY += this.m_dy; + } this.m_dx = 0; this.m_dy = 0; //System.printString("Ghost " + this.m_index + ": (" + this.m_locX + ", " + this.m_locY + ")\n"); diff --git a/Robust/src/Benchmarks/MMG/Java/MMG.java b/Robust/src/Benchmarks/MMG/Java/MMG.java index ebd3950d..dd87c5ad 100755 --- a/Robust/src/Benchmarks/MMG/Java/MMG.java +++ b/Robust/src/Benchmarks/MMG/Java/MMG.java @@ -33,8 +33,8 @@ public class MMG { map.m_desY[i] = ty*(i%2); map.m_pacOriX[i] = pacman.m_locX; map.m_pacOriY[i] = pacman.m_locY; - map.m_leftLives[i] = map.m_leftLevels[i] = 60; - pacman.m_leftLives = pacman.m_leftLevels = 60; + map.m_leftLives[i] = map.m_leftLevels[i] = 20; + pacman.m_leftLives = pacman.m_leftLevels = 20; map.m_pacmen[i] = pacman; //System.printString("destination: " + map.desX[i] + "," + map.desY[i] + "\n"); } diff --git a/Robust/src/Benchmarks/MMG/Java/Pacman.java b/Robust/src/Benchmarks/MMG/Java/Pacman.java index 17034312..b849d106 100755 --- a/Robust/src/Benchmarks/MMG/Java/Pacman.java +++ b/Robust/src/Benchmarks/MMG/Java/Pacman.java @@ -418,8 +418,23 @@ public class Pacman { } public void doMove() { - this.m_locX += this.m_dx; - this.m_locY += this.m_dy; + if((this.m_dx == -1) && (this.m_locX == 0)) { + // go left and currently this.m_locX is 0 + this.m_locX = this.m_map.m_nrofblocks - 1; + } else if((this.m_dx == 1) && (this.m_locX == this.m_map.m_nrofblocks - 1)) { + this.m_locX = 0; + } else { + this.m_locX += this.m_dx; + } + + if((this.m_dy == -1) && (this.m_locY == 0)) { + // go up and currently this.m_locY is 0 + this.m_locY = this.m_map.m_nrofblocks - 1; + } else if((this.m_dy == 1) && (this.m_locY == this.m_map.m_nrofblocks - 1)) { + this.m_locY = 0; + } else { + this.m_locY += this.m_dy; + } this.m_dx = 0; this.m_dy = 0; //System.printString("Pacmen " + this.m_index + ": (" + this.m_locX + ", " + this.m_locY + ")\n"); diff --git a/Robust/src/Benchmarks/MMG/Nor/Ghost.java b/Robust/src/Benchmarks/MMG/Nor/Ghost.java index 8d0b1942..acb87991 100755 --- a/Robust/src/Benchmarks/MMG/Nor/Ghost.java +++ b/Robust/src/Benchmarks/MMG/Nor/Ghost.java @@ -329,8 +329,23 @@ public class Ghost { } public void doMove() { - this.m_locX += this.m_dx; - this.m_locY += this.m_dy; + if((this.m_dx == -1) && (this.m_locX == 0)) { + // go left and currently this.m_locX is 0 + this.m_locX = this.m_map.m_nrofblocks - 1; + } else if((this.m_dx == 1) && (this.m_locX == this.m_map.m_nrofblocks - 1)) { + this.m_locX = 0; + } else { + this.m_locX += this.m_dx; + } + + if((this.m_dy == -1) && (this.m_locY == 0)) { + // go up and currently this.m_locY is 0 + this.m_locY = this.m_map.m_nrofblocks - 1; + } else if((this.m_dy == 1) && (this.m_locY == this.m_map.m_nrofblocks - 1)) { + this.m_locY = 0; + } else { + this.m_locY += this.m_dy; + } this.m_dx = 0; this.m_dy = 0; //System.printString("Ghost " + this.m_index + ": (" + this.m_locX + ", " + this.m_locY + ")\n"); diff --git a/Robust/src/Benchmarks/MMG/Nor/MMG.java b/Robust/src/Benchmarks/MMG/Nor/MMG.java index 827b42cd..72b7340f 100755 --- a/Robust/src/Benchmarks/MMG/Nor/MMG.java +++ b/Robust/src/Benchmarks/MMG/Nor/MMG.java @@ -41,8 +41,8 @@ task initMap(Map map{init}) { map.m_desY[i] = ty*(i%2); map.m_pacOriX[i] = pacman.m_locX; map.m_pacOriY[i] = pacman.m_locY; - map.m_leftLives[i] = map.m_leftLevels[i] = 60; - pacman.m_leftLives = pacman.m_leftLevels = 60; + map.m_leftLives[i] = map.m_leftLevels[i] = 20; + pacman.m_leftLives = pacman.m_leftLevels = 20; } map.m_ghostcount = 0; @@ -102,7 +102,6 @@ task updatePac(Map map{updatePac}, /*optional*/ Pacman p{update}) { //System.printString("Pacman " + p.m_index + ": (" + map.m_pacMenX[p.m_index] + "," + map.m_pacMenY[p.m_index] + ")\n"); boolean death = map.check(p); /*} else { - map.m_deathcount++; map.m_paccount++; }*/ diff --git a/Robust/src/Benchmarks/MMG/Nor/Pacman.java b/Robust/src/Benchmarks/MMG/Nor/Pacman.java index 117914c0..82d9ab89 100755 --- a/Robust/src/Benchmarks/MMG/Nor/Pacman.java +++ b/Robust/src/Benchmarks/MMG/Nor/Pacman.java @@ -421,8 +421,23 @@ public class Pacman { } public void doMove() { - this.m_locX += this.m_dx; - this.m_locY += this.m_dy; + if((this.m_dx == -1) && (this.m_locX == 0)) { + // go left and currently this.m_locX is 0 + this.m_locX = this.m_map.m_nrofblocks - 1; + } else if((this.m_dx == 1) && (this.m_locX == this.m_map.m_nrofblocks - 1)) { + this.m_locX = 0; + } else { + this.m_locX += this.m_dx; + } + + if((this.m_dy == -1) && (this.m_locY == 0)) { + // go up and currently this.m_locY is 0 + this.m_locY = this.m_map.m_nrofblocks - 1; + } else if((this.m_dy == 1) && (this.m_locY == this.m_map.m_nrofblocks - 1)) { + this.m_locY = 0; + } else { + this.m_locY += this.m_dy; + } this.m_dx = 0; this.m_dy = 0; //System.printString("Pacmen " + this.m_index + ": (" + this.m_locX + ", " + this.m_locY + ")\n"); diff --git a/Robust/src/Benchmarks/MMG/Tag/Ghost.java b/Robust/src/Benchmarks/MMG/Tag/Ghost.java index 1f6e4e54..802d9efd 100755 --- a/Robust/src/Benchmarks/MMG/Tag/Ghost.java +++ b/Robust/src/Benchmarks/MMG/Tag/Ghost.java @@ -339,8 +339,23 @@ public class Ghost { } public void doMove() { - this.m_locX += this.m_dx; - this.m_locY += this.m_dy; + if((this.m_dx == -1) && (this.m_locX == 0)) { + // go left and currently this.m_locX is 0 + this.m_locX = this.m_map.m_nrofblocks - 1; + } else if((this.m_dx == 1) && (this.m_locX == this.m_map.m_nrofblocks - 1)) { + this.m_locX = 0; + } else { + this.m_locX += this.m_dx; + } + + if((this.m_dy == -1) && (this.m_locY == 0)) { + // go up and currently this.m_locY is 0 + this.m_locY = this.m_map.m_nrofblocks - 1; + } else if((this.m_dy == 1) && (this.m_locY == this.m_map.m_nrofblocks - 1)) { + this.m_locY = 0; + } else { + this.m_locY += this.m_dy; + } this.m_dx = 0; this.m_dy = 0; //System.printString("Ghost " + this.m_index + ": (" + this.m_locX + ", " + this.m_locY + ")\n"); diff --git a/Robust/src/Benchmarks/MMG/Tag/MMG.java b/Robust/src/Benchmarks/MMG/Tag/MMG.java index 1b2adf68..19f93e84 100755 --- a/Robust/src/Benchmarks/MMG/Tag/MMG.java +++ b/Robust/src/Benchmarks/MMG/Tag/MMG.java @@ -31,8 +31,8 @@ task initMap(Map map{init}) { map.m_desY[i] = ty*(i%2); map.m_pacOriX[i] = pacman.m_locX; map.m_pacOriY[i] = pacman.m_locY; - map.m_leftLives[i] = map.m_leftLevels[i] = 60; - pacman.m_leftLives = pacman.m_leftLevels = 60; + map.m_leftLives[i] = map.m_leftLevels[i] = 20; + pacman.m_leftLives = pacman.m_leftLevels = 20; //map.m_destinationX[i] = pacman.m_locX; //map.m_destinationY[i] = pacman.m_locY; } @@ -91,7 +91,6 @@ task updatePac(Map map{updatePac}, optional Pacman p{update}) { //System.printString("Pacman " + p.m_index + ": (" + map.m_pacMenX[p.m_index] + "," + map.m_pacMenY[p.m_index] + ")\n"); boolean death = map.check(p); } else { - map.m_deathcount++; map.m_paccount++; } diff --git a/Robust/src/Benchmarks/MMG/Tag/Pacman.java b/Robust/src/Benchmarks/MMG/Tag/Pacman.java index 117914c0..82d9ab89 100755 --- a/Robust/src/Benchmarks/MMG/Tag/Pacman.java +++ b/Robust/src/Benchmarks/MMG/Tag/Pacman.java @@ -421,8 +421,23 @@ public class Pacman { } public void doMove() { - this.m_locX += this.m_dx; - this.m_locY += this.m_dy; + if((this.m_dx == -1) && (this.m_locX == 0)) { + // go left and currently this.m_locX is 0 + this.m_locX = this.m_map.m_nrofblocks - 1; + } else if((this.m_dx == 1) && (this.m_locX == this.m_map.m_nrofblocks - 1)) { + this.m_locX = 0; + } else { + this.m_locX += this.m_dx; + } + + if((this.m_dy == -1) && (this.m_locY == 0)) { + // go up and currently this.m_locY is 0 + this.m_locY = this.m_map.m_nrofblocks - 1; + } else if((this.m_dy == 1) && (this.m_locY == this.m_map.m_nrofblocks - 1)) { + this.m_locY = 0; + } else { + this.m_locY += this.m_dy; + } this.m_dx = 0; this.m_dy = 0; //System.printString("Pacmen " + this.m_index + ": (" + this.m_locX + ", " + this.m_locY + ")\n");