higher order rocks + beard5 map

This commit is contained in:
Stefan Bühler 2012-07-15 14:03:54 +02:00
parent dc3726f4c0
commit 068cc396dd
15 changed files with 104 additions and 20 deletions

View File

@ -1,5 +1,6 @@
MAPS= MAPS=
MAPS+=$(wildcard ../maps/horock*.map)
MAPS+=$(wildcard ../maps/beard*.map) MAPS+=$(wildcard ../maps/beard*.map)
MAPS+=$(wildcard ../maps/trampoline*.map) MAPS+=$(wildcard ../maps/trampoline*.map)
MAPS+=$(wildcard ../maps/flood*.map) MAPS+=$(wildcard ../maps/flood*.map)
@ -17,7 +18,7 @@ maps.js: FORCE
SPRITES=earth.png empty.png lambda.png lift.png openlift.png miner.png rock.png bricks.png SPRITES=earth.png empty.png lambda.png lift.png openlift.png miner.png rock.png bricks.png
SPRITES+=$(wildcard trampoline?.png) SPRITES+=$(wildcard trampoline?.png)
SPRITES+=$(wildcard target?.png) SPRITES+=$(wildcard target?.png)
SPRITES+=beard.png razor.png deadminer.png minerlift.png SPRITES+=beard.png razor.png deadminer.png minerlift.png horock.png
sprites.png: $(SPRITES) sprites.png: $(SPRITES)
convert -background "#000000" -append $(SPRITES) tmp_sprites.png convert -background "#000000" -append $(SPRITES) tmp_sprites.png

View File

@ -18,7 +18,8 @@ var mineGui_spriteOffset = {
'A': 8,'B': 9,'C':10,'D':11,'E':12,'F':13,'G':14,'H':15,'I':16, 'A': 8,'B': 9,'C':10,'D':11,'E':12,'F':13,'G':14,'H':15,'I':16,
'1':17,'2':18,'3':19,'4':20,'5':21,'6':22,'7':23,'8':24,'9':25, '1':17,'2':18,'3':19,'4':20,'5':21,'6':22,'7':23,'8':24,'9':25,
'W':26, 'W':26,
'!':27 '!':27,
'@':30
}; };
var mineGui_spriteOffset_Lost = { var mineGui_spriteOffset_Lost = {
'R': 28, 'R': 28,
@ -32,7 +33,8 @@ var mineGui_spriteOffset_Lost = {
'A': 8,'B': 9,'C':10,'D':11,'E':12,'F':13,'G':14,'H':15,'I':16, 'A': 8,'B': 9,'C':10,'D':11,'E':12,'F':13,'G':14,'H':15,'I':16,
'1':17,'2':18,'3':19,'4':20,'5':21,'6':22,'7':23,'8':24,'9':25, '1':17,'2':18,'3':19,'4':20,'5':21,'6':22,'7':23,'8':24,'9':25,
'W':26, 'W':26,
'!':27 '!':27,
'@':30
}; };
var mineGui_spriteOffset_Won = { var mineGui_spriteOffset_Won = {
'R': 29, 'R': 29,
@ -46,7 +48,8 @@ var mineGui_spriteOffset_Won = {
'A': 8,'B': 9,'C':10,'D':11,'E':12,'F':13,'G':14,'H':15,'I':16, 'A': 8,'B': 9,'C':10,'D':11,'E':12,'F':13,'G':14,'H':15,'I':16,
'1':17,'2':18,'3':19,'4':20,'5':21,'6':22,'7':23,'8':24,'9':25, '1':17,'2':18,'3':19,'4':20,'5':21,'6':22,'7':23,'8':24,'9':25,
'W':26, 'W':26,
'!':27 '!':27,
'@':30
}; };
var mineGui_images = {}; var mineGui_images = {};
@ -346,7 +349,7 @@ function mineGui_show(queued) {
document.getElementById("mineGui_state").textContent = state; document.getElementById("mineGui_state").textContent = state;
document.getElementById("mineGui_score").textContent = mineGui_mine.score; document.getElementById("mineGui_score").textContent = mineGui_mine.score;
document.getElementById("mineGui_scoreMoves").textContent = mineGui_mine.moves; document.getElementById("mineGui_scoreMoves").textContent = mineGui_mine.moves;
document.getElementById("mineGui_scoreLambdas").textContent = mineGui_mine.found_lambdas; document.getElementById("mineGui_scoreLambdas").textContent = mineGui_mine.found_lambdas + "/" + (mineGui_mine.lambdas+mineGui_mine.found_lambdas);
document.getElementById("mineGui_razors").textContent = mineGui_mine.razors; document.getElementById("mineGui_razors").textContent = mineGui_mine.razors;
document.getElementById("mineGui_belowWater").textContent = mineGui_mine.moves_below_water; document.getElementById("mineGui_belowWater").textContent = mineGui_mine.moves_below_water;
} }

2
js/gui.min.js vendored

File diff suppressed because one or more lines are too long

BIN
js/horock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

File diff suppressed because one or more lines are too long

2
js/maps.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -73,6 +73,7 @@ var Mine = function() {
case 'W': case 'W':
case '!': case '!':
break; break;
case '@':
case '\\': case '\\':
this.lambdas++; this.lambdas++;
break; break;
@ -180,6 +181,7 @@ var Mine = function() {
case 'L': return false; case 'L': return false;
case 'O': return true; case 'O': return true;
case '*': case '*':
case '@':
if (' ' == this.map[this.robot.y][this.robot.x+2*n]) return true; if (' ' == this.map[this.robot.y][this.robot.x+2*n]) return true;
default: default:
if (this.trampoline.sources.hasOwnProperty(c)) return true; if (this.trampoline.sources.hasOwnProperty(c)) return true;
@ -199,6 +201,7 @@ var Mine = function() {
case 'L': return false; case 'L': return false;
case 'O': return true; case 'O': return true;
case '*': return false; case '*': return false;
case '@': return false;
default: default:
if (this.trampoline.sources.hasOwnProperty(c)) return true; if (this.trampoline.sources.hasOwnProperty(c)) return true;
break; break;
@ -227,7 +230,8 @@ var Mine = function() {
c = map[this.robot.y][this.robot.x+n]; c = map[this.robot.y][this.robot.x+n];
switch (c) { switch (c) {
case '*': case '*':
map[this.robot.y][this.robot.x+2*n] = '*'; case '@':
map[this.robot.y][this.robot.x+2*n] = c;
break; break;
case '\\': case '\\':
this.lambdas--; this.lambdas--;
@ -317,27 +321,31 @@ var Mine = function() {
for (y = 2; y < 2+this.height; ++y) { for (y = 2; y < 2+this.height; ++y) {
for (x = 1; x <= this.width; ++x) { for (x = 1; x <= this.width; ++x) {
if ('*' == map[y][x]) { c = map[y][x];
if ('*' === c || '@' === c) {
below = map[y-1][x]; below = map[y-1][x];
if (' ' == below) { if (' ' === below) {
// fall down // fall down
newMap[y-1][x] = '*'; newMap[y-1][x] = c;
if ('@' === c && ' ' != map[y-2][x]) newMap[y-1][x] = '\\';
newMap[y][x] = ' '; newMap[y][x] = ' ';
if ('R' == map[y-2][x]) this._crushed(); if ('R' === map[y-2][x]) this._crushed();
} else if ((below == '*' || below == '\\') && ' ' == map[y-1][x+1] && ' ' == map[y][x+1]) { } else if ((below === '*' || below === '\\' || below === '@') && ' ' === map[y-1][x+1] && ' ' === map[y][x+1]) {
// fall right // fall right
newMap[y-1][x+1] = '*'; newMap[y-1][x+1] = c;
if ('@' === c && ' ' != map[y-2][x+1]) newMap[y-1][x+1] = '\\';
newMap[y][x] = ' '; newMap[y][x] = ' ';
if ('R' == map[y-2][x+1]) this._crushed(); if ('R' == map[y-2][x+1]) this._crushed();
} else if ((below == '*') && ' ' == map[y-1][x-1] && ' ' == map[y][x-1]) { } else if ((below === '*' || below === '@') && ' ' === map[y-1][x-1] && ' ' === map[y][x-1]) {
// fall left // fall left
newMap[y-1][x-1] = '*'; newMap[y-1][x-1] = c;
if ('@' === c && ' ' != map[y-2][x-1]) newMap[y-1][x-1] = '\\';
newMap[y][x] = ' '; newMap[y][x] = ' ';
if ('R' == map[y-2][x-1]) this._crushed(); if ('R' == map[y-2][x-1]) this._crushed();
} }
} else if (growBeard && 'W' == map[y][x]) { } else if (growBeard && 'W' === c) {
for (i = -1; i <= 1; ++i) for (j = -1; j <= 1; ++j) { for (i = -1; i <= 1; ++i) for (j = -1; j <= 1; ++j) {
if (' ' == map[y+i][x+j]) newMap[y+i][x+j] = 'W'; if (' ' === map[y+i][x+j]) newMap[y+i][x+j] = 'W';
} }
} }
} }

2
js/mine.min.js vendored

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 963 B

After

Width:  |  Height:  |  Size: 1009 B

29
maps/beard5.map Normal file
View File

@ -0,0 +1,29 @@
##########
####..******####
###.. 3ABCDEF...##
## ##
### ##
###.....\\\...\\\.....###
#.. \\\ * \\\ ##
## * ##
### *** ##
#*****************##
###..............##
###...........##
####WR..W####
##L####
.....
###### ######
##1\! G##2 !\H##
###### ######
Trampoline A targets 1
Trampoline B targets 1
Trampoline C targets 1
Trampoline D targets 1
Trampoline E targets 1
Trampoline F targets 1
Trampoline G targets 2
Trampoline H targets 3
Growth 5
Razors 10

14
maps/horock1.map Normal file
View File

@ -0,0 +1,14 @@
#####L######
#....R....A#
#..........#
#\. #@\ ..#
#\...#* ###
#\.........#
#\..*.@....#
####@@. ..#
#....#.. ###
#....#..**.#
#.1..# .\\#
############
Trampoline A targets 1

13
maps/horock2.map Normal file
View File

@ -0,0 +1,13 @@
#################
#A .@@@@@@#
# .. #*...*1#
# .##########*##
# ..@ \\\\#* #
# ..# #####*.#
# .##### * #
#LR ....... . #
#################
Trampoline A targets 1
Flooding 10
Water 0

16
maps/horock3.map Normal file
View File

@ -0,0 +1,16 @@
#################
# \\\\# * * #
# ## !!#..@. ####
#* @...####.....#
#\\ \@...........#
#\ # .\@ # #.########
#\ # ..\@ # .. #
#\ # .. \@ # .. #
#\ # *.. \@ ####### #
#\ # ### \@ # #W #
### # \@ # ##L#
#...#@@**@@**\@ #
#R ..........!\##
#################
Growth 25

BIN
specs/horocks.pdf Normal file

Binary file not shown.

BIN
specs/images/horock.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB