jetrix-cvs Mailing List for Jetrix TetriNET Server (Page 9)
Brought to you by:
smanux
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(47) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(11) |
Feb
(34) |
Mar
(52) |
Apr
(79) |
May
(14) |
Jun
(41) |
Jul
(19) |
Aug
(44) |
Sep
(36) |
Oct
(36) |
Nov
(6) |
Dec
(58) |
2004 |
Jan
(23) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(91) |
2005 |
Jan
(137) |
Feb
(10) |
Mar
(2) |
Apr
(41) |
May
(62) |
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(39) |
Sep
(18) |
Oct
|
Nov
(9) |
Dec
|
2009 |
Jan
|
Feb
(27) |
Mar
(4) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
(3) |
Feb
(14) |
Mar
(3) |
Apr
(10) |
May
(15) |
Jun
|
Jul
|
Aug
(9) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Emmanuel B. <sm...@us...> - 2005-05-10 02:23:01
|
Update of /cvsroot/jetrix/jetrix/src/java/net/jetrix/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1133 Modified Files: LogoFilter.java Log Message: Updated to load the field from an external file Index: LogoFilter.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/filter/LogoFilter.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LogoFilter.java 4 Apr 2005 09:36:17 -0000 1.4 --- LogoFilter.java 10 May 2005 02:22:52 -0000 1.5 *************** *** 21,24 **** --- 21,25 ---- import java.util.*; + import java.io.*; import net.jetrix.*; *************** *** 26,30 **** /** ! * Display a logo on the field of players loosing the game. * * @author Emmanuel Bourg --- 27,31 ---- /** ! * Display a logo on the field of players losing the game. * * @author Emmanuel Bourg *************** *** 33,71 **** public class LogoFilter extends GenericFilter { ! private short jetrixLogo[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, ! 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, ! 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, ! 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, ! 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0}; ! public void onMessage(PlayerLostMessage m, List<Message> out) { ! // send closing screen ! StringBuilder screenLayout = new StringBuilder(); ! for (int i = 0; i < 12 * 22; i++) { ! screenLayout.append(((int) (Math.random() * 5 + 1)) * (1 - jetrixLogo[i])); } FieldMessage endingScreen = new FieldMessage(); endingScreen.setSlot(m.getSlot()); ! endingScreen.setField(screenLayout.toString()); out.add(m); --- 34,61 ---- public class LogoFilter extends GenericFilter { + private static final String DEFAULT_FIELD = "data/jetrix.field"; ! private Field field; ! public void init() { ! // load the field ! field = new Field(); ! try { ! field.load(DEFAULT_FIELD); ! } ! catch (IOException e) ! { ! e.printStackTrace(); } + } + + public void onMessage(PlayerLostMessage m, List<Message> out) + { + // send closing screen FieldMessage endingScreen = new FieldMessage(); endingScreen.setSlot(m.getSlot()); ! endingScreen.setField(field.getFieldString()); out.add(m); |
From: Emmanuel B. <sm...@us...> - 2005-05-10 02:21:17
|
Update of /cvsroot/jetrix/jetrix/src/etc/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv733 Added Files: jetrix.field Log Message: no message --- NEW FILE: jetrix.field --- 666666666666 666666006006 666666660666 666666006006 666666666666 666666000006 666666666666 666666006006 666666060666 666666000006 666666666666 666666066666 666666000006 666666066666 666666666666 666666066606 666666060606 666666000006 666666666666 666666000006 666666666606 666666666006 |
Update of /cvsroot/jetrix/jetrix/src/etc/data/puzzle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv538 Added Files: game10.field game10.settings game12.field game12.settings game125.field game125.settings game127.field game127.settings game13.field game13.settings game14.field game14.settings game141.field game141.settings game142.field game142.settings game143.field game143.settings game144.field game144.settings game145.field game145.settings game146.field game146.settings game147.field game147.settings game149.field game149.settings game15.field game15.settings game150.field game150.settings game156.field game156.settings game16.field game16.settings game17.field game17.settings game18.field game18.settings game19.field game19.settings game196.field game196.settings game22.field game22.settings game23.field game23.settings game3.field game3.settings game32.field game32.settings game33.field game33.settings game34.field game34.settings game35.field game35.settings game4.field game4.settings game5.field game5.settings game53.field game53.settings game56.field game56.settings game57.field game57.settings game58.field game58.settings game59.field game59.settings game6.field game6.settings game67.field game67.settings game68.field game68.settings game69.field game69.settings game7.field game7.settings game70.field game70.settings game71.field game71.settings game75.field game75.settings game76.field game76.settings game79.field game79.settings game8.field game8.settings game80.field game80.settings game82.field game82.settings game83.field game83.settings Log Message: Puzzles contributed by Nils --- NEW FILE: game144.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 00oo000o00o0 00oooo0ooooo 000ooooooooo 000000000000 o00000000000 000ooooooo00 000ooooooo00 ooooo00oo000 ooo0000o0000 o00000000000 000000000000 o000oo0000o0 0000oooooooo o0000000o0o0 000000000000 0o0000000000 oooooooooo00 --- NEW FILE: game142.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 110011001100 110011001100 111111001100 000000000000 000000000000 s10011001100 s10000000000 s10000000000 s10011001100 s10011001100 --- NEW FILE: game156.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 020000000000 100000500020 503000000300 a0a151211413 000000000000 000000000000 500000000000 011101000000 000000101111 000000000000 11001111aaaa 121100000450 111110000110 000001111111 000000000000 002233121n1s 050030020001 --- NEW FILE: game15.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000011110000 000110011000 001000000100 001030030100 001000000100 001000000100 001000000100 001010010100 001101101100 000000000000 --- NEW FILE: game16.settings --- NAME "Secret Treasure" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game71.settings --- NAME "SnS Start Over" COMMENT none DESIGNER NiLS BLOCK 0 0 50 0 0 0 50 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 10 SUDDENDEATHMSG Go ! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game156.settings --- NAME "Maginot Line" COMMENT booh 3 DESIGNER NiLS BLOCK 50 50 0 0 0 0 0 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 60 2 5 SUDDENDEATHMSG <CaptainBlood>OMG OMG RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game67.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000222220000 002222222000 022222222200 222222222220 222222222200 22222222200g 222222222200 222222222220 022222222200 002222222000 000222220000 --- NEW FILE: game149.settings --- NAME "The Teddy Bear" COMMENT pouet DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 140 3 10 SUDDENDEATHMSG What happenned to my teddy bear ! RULES 1 2 1 5 5 18 1 1 MISC 1 1 1 --- NEW FILE: game58.settings --- NAME "The Grid" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 120 1 10 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game18.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000001110000 000110001000 001001100100 01001go00100 100010001000 100001110000 000000000000 000000000000 000000000000 000000000000 --- NEW FILE: game56.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 10010010010r 11111111110q 10010010010g 10010010010s --- NEW FILE: game147.settings --- NAME "Objective: 180" COMMENT speed ! sns style, c and a added, 4 options limited special capacity of players DESIGNER NiLS BLOCK 0 0 50 0 0 0 50 SPECIAL 50 50 0 0 0 0 0 0 0 SUDDENDEATH 5 1 10 SUDDENDEATHMSG Time to DASH ! RULES 1 2 1 1 4 4 1 1 MISC 1 1 1 --- NEW FILE: game13.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 q00000000000 333333333000 222222222200 111111111100 --- NEW FILE: game10.settings --- NAME "The Classic nest" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game17.field --- 000000000000 000000000000 000000000000 000000000000 111000000111 101000000101 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 500000000005 420000000024 345100001543 242000000242 100000000001 --- NEW FILE: game70.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 020000000000 222000000000 121200000002 222220000022 222200000002 202000000000 000000020000 000000222000 000002121200 000022222220 000002222200 000000202000 000000000000 002000000000 0222000000ca 2121200000ca 2222220000ca --- NEW FILE: game150.settings --- NAME "Superman" COMMENT boo DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 120 1 15 SUDDENDEATHMSG Show time ! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game12.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 g30000000000 330000000000 000000000000 00000000001s 000000000011 000000000000 q20000000000 220000000000 000000000000 00000000004a 000000000044 000000000000 c50000000000 550000000000 000000000000 000000000000 --- NEW FILE: game69.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000550001100 000055011001 000003040001 a2b0g304o0s1 222c33n44qr1 --- NEW FILE: game196.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000011100000 000011110000 000110120000 000111122000 000011100000 000111110000 000111110000 000111110000 000111110000 001111110000 011011100000 010020200000 3s32232233s3 --- NEW FILE: game15.settings --- NAME "Pacman's Ghost" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game56.settings --- (This appears to be a binary file; contents omitted.) --- NEW FILE: game125.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 00000cab0000 000111110000 001oo1oo1100 211111111150 114411144110 004400044000 --- NEW FILE: game6.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 100000000001 020000000020 003000000300 000400004000 000050050000 --- NEW FILE: game8.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 400200004000 010000300040 000050000000 000000000000 --- NEW FILE: game10.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 010000000010 001002200100 000111111000 000000000000 000000000000 000000000000 000000000000 000000000000 --- NEW FILE: game33.settings --- NAME "The rObOt" COMMENT no comment DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game18.settings --- NAME "The Impossible Spiral" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game141.settings --- NAME "Destiny" COMMENT DESIGNER NiLS BLOCK 0 0 100 0 0 0 0 SPECIAL 0 100 0 0 0 0 0 0 0 SUDDENDEATH 60 1 15 SUDDENDEATHMSG Try to survive ! RULES 1 2 1 1 2 18 1 1 MISC 1 1 1 --- NEW FILE: game141.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000414141414 100000000000 400000000000 141414140010 000000000000 000000000000 014140041414 000000000000 000000000000 004000000400 00c000000c00 00c410014c00 00c000000c00 00c000000c00 00c414141c00 00c141414c00 141410041414 --- NEW FILE: game33.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000002100000 000002200000 00000200002o 000022200200 000222222000 002022200011 00200200001o 000002000011 00002020001o 000020200011 00022022001o --- NEW FILE: game22.settings --- NAME "The Smiley" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game7.settings --- NAME "The Trap" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game80.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 004440000000 004aa0000000 000000000000 000044400000 00004aa00000 000000000000 000000444000 0000004aa000 000000000030 000000003330 00000030ccc0 000033300000 0030ccc00000 333000000000 ccc000000000 --- NEW FILE: game83.settings --- NAME "The Snail" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 20 1 5 SUDDENDEATHMSG Try to survive! Snails! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game146.settings --- NAME "Green bomberman" COMMENT je veuuux en lignnnne DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 0 0 0 0 0 0 0 0 100 SUDDENDEATH 120 1 15 SUDDENDEATHMSG Bomb ! RULES 1 2 1 1 4 1 1 1 MISC 1 1 1 --- NEW FILE: game8.settings --- NAME "Bomb effect" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game14.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 g2000000003b 220000000033 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 110110110110 110110110110 110110110110 --- NEW FILE: game80.settings --- NAME "Copernic" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 10 SUDDENDEATHMSG Time ! IT'S SUDDENDEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game34.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000002000200 00002g202g20 000002300230 000000030003 000000030003 003003030003 033333333333 000003003000 033030303300 000333000300 033330300330 030330003030 --- NEW FILE: game23.settings --- NAME "Get the S !" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game57.settings --- NAME "Rush Hour" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 120 1 10 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game53.settings --- NAME "Starting blocks" COMMENT none DESIGNER NiLS BLOCK 25 0 25 25 0 0 25 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 120 1 10 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game146.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000003330000 000033333000 000355555300 00035o5o5300 000355555300 000333333300 000033333000 000333333300 003333333330 055112211155 000333333300 000550005500 005550005550 --- NEW FILE: game6.settings --- NAME "Reverse Stairs" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game13.settings --- NAME "Attack !" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game125.settings --- NAME "the CAB" COMMENT vroum vroum vrouuuuuummmmm DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 60 1 1 SUDDENDEATHMSG Where do i drive you ? RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game69.settings --- NAME "tetrinet: cookies" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 10 1 10 SUDDENDEATHMSG Thought it would have been easy ? RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game35.settings --- NAME "Magic Chaos: the race is on" COMMENT the G makes the field become a perfect tetris DESIGNER NiLS BLOCK 0 0 0 0 0 0 100 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game12.settings --- NAME "The first race" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game149.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 002200002200 002022220200 000252252000 000224422000 000022220000 022001100220 022222222220 000222222000 002222222200 0222s00s2220 022220022220 --- NEW FILE: game22.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000012120000 000100001000 0020g00q0100 010000000020 020000000010 010300003020 001033330100 000100001000 000011110000 --- NEW FILE: game59.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000q00000 000000q00000 00q000q000q0 0q0000q0000q 0q0000q0000q 00qq00q00qq0 0000q0q0q000 0000q0q0q000 0000q0q0q000 0000q0q0q000 0000q0q0q000 --- NEW FILE: game83.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 001100200020 010010020200 100001022200 100101022200 011101222000 221112220000 000000000000 000000000000 0ccccccccc00 --- NEW FILE: game7.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 123451200123 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 --- NEW FILE: game59.settings --- NAME "QUAKE" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 100 1 5 SUDDENDEATHMSG LET'S FRAG! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game144.settings --- NAME "O' brother" COMMENT DESIGNER NiLS BLOCK 0 0 100 0 0 0 0 SPECIAL 0 0 0 0 50 0 0 0 50 SUDDENDEATH 120 1 15 SUDDENDEATHMSG Bomb ! RULES 1 2 1 2 4 3 1 1 MISC 1 1 1 --- NEW FILE: game70.settings --- NAME "Ignition" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 10 SUDDENDEATHMSG Ignition ! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game17.settings --- NAME "The 2 betrayors" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game35.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 110111111111 000000000000 101111111111 000000000000 0g1111111111 000000000000 040400040000 00a044a00400 2a2020203040 20300a020020 030200300030 a00300035000 5505a3050000 005055500050 --- NEW FILE: game79.settings --- NAME "Homeless" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 10 SUDDENDEATHMSG Time ! IT'S SUDDENDEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game32.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 222222000222 222222000222 222220000022 110001111111 1100011111ss 1000001111ss 4aa4400044cc aaa4400044cc aaa4000004cc --- NEW FILE: game57.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 111110011111 003333333333 555555o55505 400000000004 100000000001 20s00q00b002 30osqo0bob03 --- NEW FILE: game143.settings --- NAME "Starting Blocks 2" COMMENT DESIGNER NiLS BLOCK 0 0 50 0 0 0 50 SPECIAL 0 0 0 0 50 0 0 0 50 SUDDENDEATH 120 1 15 SUDDENDEATHMSG Booyakah ! RULES 1 2 1 1 0 9 1 1 MISC 1 1 1 --- NEW FILE: game75.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 222222222200 20ooooooo200 2o02222oo200 202o22o2o200 20o2go2oo200 2o01sq2oo200 2o1o2202o100 2oo22220o200 2ooooooo0100 021211111200 000000000000 000000000000 00o121211121 --- NEW FILE: game76.settings --- NAME "The Bombing Party" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 10 SUDDENDEATHMSG Time ! IT'S SUDDENDEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game58.field --- 000000000000 000000000000 000000000000 000000000000 00s11111111g 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 201040040103 030502005020 201040040103 030502005020 201040040103 030502005020 201040040103 030502005020 --- NEW FILE: game71.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 202000000000 020000000000 202000000000 b22220022222 202121212100 020212121000 202121210000 020212100002 202121000021 020120000212 201200002121 020200021212 202100002121 020210000212 202102000021 020202100012 2g2121210021 --- NEW FILE: game16.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 022222222200 300000000000 300000000000 011111111111 000000000004 aaa000000004 aaa000000004 --- NEW FILE: game196.settings --- NAME "Wacko Birds" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 60 2 10 SUDDENDEATHMSG Time to Fly High RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game143.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 111011111111 222220222222 333333303333 444444444044 555555555550 01abcgnoqrs1 --- NEW FILE: game5.settings --- NAME "Classic Stairs" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game68.settings --- NAME "Running man" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 10 1 10 SUDDENDEATHMSG Run! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game3.settings --- NAME "Left or Right" COMMENT no comment DESIGNER NiLS BLOCK 14 14 15 14 14 14 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time's up! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game82.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 444444444440 400202020040 400202020040 400202020040 400g0b0g0040 400000000040 --- NEW FILE: game79.field --- 000000000000 000000000000 000000000000 000000000000 000000000100 000000001000 000000000100 000000000000 000000010000 000000001000 000000000000 000000010000 000000110000 000000000000 000000100000 000000000000 000102000000 001212000000 012221000000 112221100000 021212000000 s22212000000 --- NEW FILE: game82.settings --- NAME "Newton's cradle" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 10 SUDDENDEATHMSG Time ! IT'S SUDDENDEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game76.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 0000ooo00000 0000oso00000 0000ooo00000 000000000000 0000ooo00000 0000oso00000 0000ooo00000 000000000000 0000ooo00000 0000oso00000 0000ooo00000 000000000000 000000000000 000000000000 0000ooo00000 000000000000 000000000000 --- NEW FILE: game19.settings --- NAME "Learn !" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game4.settings --- NAME "Pyramidal stairs" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 15 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game14.settings --- NAME "Learn to get first" COMMENT none DESIGNER NiLS BLOCK 14 14 14 15 14 15 14 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game32.settings --- NAME "_||_ Race" COMMENT no comment DESIGNER NiLS BLOCK 33 0 0 33 0 0 34 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG The Race is ON! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game4.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000001100000 000050050000 000400004000 003000000300 020000000020 100000000001 --- NEW FILE: game127.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 011111000000 100000100000 100000100000 100000100000 1ss0s0100000 011111000000 000001000000 000000100000 000000010000 000000000000 000000000230 000000000331 130003333311 133333333311 111111111111 100000000001 --- NEW FILE: game19.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 120000000000 030000000000 040000000000 050000000000 010000000000 020000000000 030000000000 040000000000 --- NEW FILE: game145.settings --- NAME "SnS Chess" COMMENT DESIGNER NiLS BLOCK 0 0 0 0 0 50 50 SPECIAL 0 0 0 0 0 0 0 0 100 SUDDENDEATH 120 1 15 SUDDENDEATHMSG Bomb ! RULES 1 2 1 1 4 3 1 1 MISC 1 1 1 --- NEW FILE: game34.settings --- NAME "G Tetris flowers" COMMENT the G makes the field becom a perfect tetris DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 30 SUDDENDEATHMSG Time! It's SUDDEN DEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game145.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000001100000 000011110000 ooo011110ooo ooo011110ooo ooo001100ooo ooo00110oooo soo00110ooos ooo001100ooo oo00111100oo o0011111100o o0111111110o --- NEW FILE: game3.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 120000000021 100000000001 120000000021 100000000001 120000000021 100000000001 --- NEW FILE: game68.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000002200 000200002200 000022020000 000000220000 000000202220 040002000000 402002200000 000220020000 000000020000 0000000s4000 --- NEW FILE: game147.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 121212121210 212121212120 121212121210 212121212120 --- NEW FILE: game75.settings --- NAME "SnS Nuke" COMMENT none DESIGNER NiLS BLOCK 0 0 50 0 0 0 50 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 180 1 10 SUDDENDEATHMSG Time ! IT'S SUDDENDEATH MODE! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game23.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 c12341234100 000000000000 000000000000 000000000222 121212121210 212121212120 121212121210 2121212121s0 --- NEW FILE: game5.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000002 000000000010 000000000500 000000004000 000000030000 000000200000 000001000000 000050000000 000400000000 003000000000 020000000000 100000000000 --- NEW FILE: game127.settings --- NAME "The Sleeper" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 60 1 10 SUDDENDEATHMSG ZzzzZz! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game53.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 500000000005 500000000005 000000000000 550000000055 000040300000 000040300000 110040300011 110040300011 0000s0r00000 400040300003 400040300003 444440333333 555550222222 --- NEW FILE: game142.settings --- NAME "Sticks n Squares n S" COMMENT DESIGNER NiLS BLOCK 0 0 50 0 0 0 50 SPECIAL 0 100 0 0 0 0 0 0 0 SUDDENDEATH 120 1 15 SUDDENDEATHMSG *Damn only 180ppm ! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 --- NEW FILE: game150.field --- 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 100000000001 00000ss00000 100000000001 000000000000 000000000000 000000000000 000000000000 --- NEW FILE: game67.settings --- NAME "Pacman" COMMENT none DESIGNER NiLS BLOCK 14 14 14 14 14 15 15 SPECIAL 32 18 1 11 3 14 1 6 14 SUDDENDEATH 10 1 15 SUDDENDEATHMSG Grab the pill ! RULES 1 2 1 1 0 18 1 1 MISC 1 1 1 |
From: Emmanuel B. <sm...@us...> - 2005-05-10 02:14:01
|
Update of /cvsroot/jetrix/jetrix/src/java/net/jetrix/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31804 Added Files: DownstackPuzzleGenerator.java FilenameComparator.java PuzzleFilter.java PuzzleGenerator.java Log Message: no message --- NEW FILE: FilenameComparator.java --- /** * Jetrix TetriNET Server * Copyright (C) 2005 Emmanuel Bourg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package net.jetrix.filter; import java.io.*; import java.util.*; /** * An improved lexicographic comparator handling a number in a name as a single * character. Unlike the lexicographic order where "foo1.txt" < "foo10.txt" < "foo2.txt" * here we have "foo1.txt" < "foo2.txt" < "foo10.txt". * * todo: move this code to commons-io or commons-lang * * @since 0.3 * * @author Emmanuel Bourg * @version $Revision: 1.1 $, $Date: 2005/05/10 02:13:41 $ */ public class FilenameComparator implements Comparator<File> { public int compare(File file1, File file2) { String name1 = file1.getAbsolutePath(); String name2 = file2.getAbsolutePath(); int index1 = 0; int index2 = 0; while (true) { String token1 = getToken(name1, index1); String token2 = getToken(name2, index2); if (token1 == null && token2 == null) { // no more tokens for each name, they are equal return 0; } if (token1 == null) { // the first name is shorter, it goes first return -1; } if (token2 == null) { // the second name is shorter, it goes first return 1; } int comp = compareToken(token1, token2); if (comp == 0) { // the tokens are equal, move to the next tokens index1 = index1 + token1.length(); index2 = index2 + token2.length(); } else { return comp; } } } /** * Extract from the string the next token starting at the specified index. * * @param string the string to parse * @param index the beginning of the token */ String getToken(String string, int index) { if (string == null || string.length() == 0 || index == string.length()) { return null; } else { // are we parsing a string or a number ? boolean type = Character.isDigit(string.charAt(index)); // move forward until a different character type is detected int end = index + 1; while (end < string.length() && Character.isDigit(string.charAt(end)) == type) { end++; } return string.substring(index, end); } } /** * Tells if the specified string is a number. */ boolean isNumber(String string) { if (string == null || string.length() == 0) { return false; } else { return Character.isDigit(string.charAt(0)); } } /** * Compare two tokens according to their types (string or number). */ int compareToken(String token1, String token2) { if (isNumber(token1) && isNumber(token2)) { return Integer.parseInt(token1) - Integer.parseInt(token2); } else { return token1.compareTo(token2); } } } --- NEW FILE: PuzzleFilter.java --- /** * Jetrix TetriNET Server * Copyright (C) 2004-2005 Emmanuel Bourg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package net.jetrix.filter; import java.util.*; import net.jetrix.*; import net.jetrix.config.*; import net.jetrix.messages.*; /** * Set the game field and settings when the game starts. A new puzzle is * displayed every time. The sequence of puzzles is generated by a * {@link PuzzleGenerator}, by default the {@link DownstackPuzzleGenerator} * is used. An alternative generator can be used by specifying the <tt>generator</tt> * parameter in the filter configuration. The filter configuration is passed * to the generator for its initialization. * * @since 0.3 * * @author Emmanuel Bourg * @version $Revision: 1.1 $, $Date: 2005/05/10 02:13:41 $ */ public class PuzzleFilter extends GenericFilter { private static final String DEFAULT_GENERATOR = DownstackPuzzleGenerator.class.getName(); private PuzzleGenerator generator; public void init() { try { generator = (PuzzleGenerator) Class.forName(getConfig().getString("generator", DEFAULT_GENERATOR)).newInstance(); } catch (Exception e) { generator = new DownstackPuzzleGenerator(); } // initialize the generator generator.init(getConfig()); } public void onMessage(NewGameMessage m, List<Message> out) { // get the next puzzle Puzzle puzzle = generator.getNextPuzzle(); // send the puzzle description PlineMessage description = new PlineMessage(); description.setKey("filter.puzzle.announce", puzzle.getKey(), puzzle.getName(), puzzle.getAuthor()); out.add(description); // update the game settings and the channel settings if (puzzle.getSettings() != null) { m.setSettings(puzzle.getSettings()); getChannel().getConfig().setSettings(puzzle.getSettings()); } // forward the new game message out.add(m); // update the field of the first slot FieldMessage fieldMessage = new FieldMessage(); fieldMessage.setSlot(1); fieldMessage.setField(puzzle.getField().getFieldString()); out.add(fieldMessage); } public void onMessage(FieldMessage m, List<Message> out) { // check the height of the new field Field field = getChannel().getField(0); if (field.getHighest() <= 2) { // stop the game getChannel().send(new EndGameMessage()); // send the congratulation message PlineMessage grats = new PlineMessage(); grats.setKey("filter.puzzle.cleared"); getChannel().send(grats); } // forward the field update out.add(m); } } --- NEW FILE: PuzzleGenerator.java --- /** * Jetrix TetriNET Server * Copyright (C) 2005 Emmanuel Bourg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package net.jetrix.filter; import net.jetrix.config.*; /** * A {@link net.jetrix.config.Puzzle} generator. * * @since 0.3 * * @author Emmanuel Bourg * @version $Revision: 1.1 $, $Date: 2005/05/10 02:13:41 $ */ public interface PuzzleGenerator { /** * Initializes the generator. * * @param config the configuration containing the configuration parameters. */ void init(Configuration config); /** * Generates the next puzzle. */ Puzzle getNextPuzzle(); } --- NEW FILE: DownstackPuzzleGenerator.java --- /** * Jetrix TetriNET Server * Copyright (C) 2005 Emmanuel Bourg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package net.jetrix.filter; import static net.jetrix.config.Block.*; import java.io.*; import java.util.logging.*; import java.util.*; import net.jetrix.config.*; import net.jetrix.*; import org.apache.commons.lang.*; /** * Puzzle generator supporting the puzzle format used by the 2ice server, * aka downstack.com. Each puzzle consists in two files, a <tt>.field</tt> file * containing the description of the field, and a <tt>.settings<tt> file * containing the game settings and the puzzle description. By default the * puzzle files are looked for in the <tt>data/puzzle</tt> sub directory, this * can be overridden by setting the <tt>path</tt> parameter. * * @since 0.3 * * @author Emmanuel Bourg * @version $Revision: 1.1 $, $Date: 2005/05/10 02:13:41 $ */ public class DownstackPuzzleGenerator implements PuzzleGenerator { private Logger log = Logger.getLogger("net.jetrix"); private static final String DEFAULT_PATH = "data/puzzle"; /** The path where the puzzle fields and settings are located. */ private String path = DEFAULT_PATH; /** The current level played. */ private int level; /** The order or the specials used in the settings file. */ public static final Block[] BLOCKS = { LEFTL, LEFTZ, SQUARE, RIGHTL, RIGHTZ, HALFCROSS, LINE }; public void init(Configuration config) { path = config.getString("path", DEFAULT_PATH); } public Puzzle getNextPuzzle() { Puzzle puzzle = new Puzzle(); try { // load the field File[] levels = getLevels(); File file = levels[level % levels.length]; level = level + 1; Field field = new Field(); field.load(file.getAbsolutePath()); puzzle.setField(field); puzzle.setKey(String.valueOf(level)); // load the settings String name = file.getAbsolutePath().replace(".field", ".settings"); readSettings(puzzle, name); } catch (IOException e) { log.log(Level.WARNING, e.getMessage(), e); } return puzzle; } /** * Find all levels in the puzzle directory. */ private File[] getLevels() { File directory = new File(path); File[] files = directory.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(".field"); } }); // sort the list of files Arrays.sort(files, new FilenameComparator()); return files; } /** * Parse the specified .settings file and update the puzzle. * * @param puzzle the puzzle to update * @param filename the settings file to parse */ private void readSettings(Puzzle puzzle, String filename) throws IOException { Settings settings = new Settings(); puzzle.setSettings(settings); File file = new File(filename); if (file.exists()) { BufferedReader in = null; try { in = new BufferedReader(new FileReader(file)); String line; while ((line = in.readLine()) != null) { if (line.startsWith("NAME")) { // parse the name and remove the leading and trailing quotes String name = line.substring(4).trim(); if (name.startsWith("\"") && name.endsWith("\"")) { name = name.substring(1, name.length() - 1); } puzzle.setName(name); } else if (line.startsWith("COMMENT")) { puzzle.setComment(line.substring(7).trim()); } else if (line.startsWith("DESIGNER")) { puzzle.setAuthor(line.substring(8).trim()); } else if (line.startsWith("SPECIAL")) { // parse the special occurancies String[] occurancy = StringUtils.split(line.substring(7).trim(), ' '); for (Special special : Special.values()) { settings.setOccurancy(special, Integer.parseInt(occurancy[special.getValue()])); } } else if (line.startsWith("BLOCK")) { // parse the block occurancies String[] occurancy = StringUtils.split(line.substring(5).trim(), ' '); // careful, it doesn't follow the standard order for (int i = 0; i < BLOCKS.length; i++) { settings.setOccurancy(BLOCKS[i], Integer.parseInt(occurancy[i])); } } else if (line.startsWith("SUDDENDEATHMSG")) { settings.setSuddenDeathMessage(line.substring(14).trim()); } else if (line.startsWith("SUDDENDEATH")) { String[] params = StringUtils.split(line.substring(11).trim(), ' '); settings.setSuddenDeathTime(Integer.parseInt(params[0])); settings.setSuddenDeathLinesAdded(Integer.parseInt(params[1])); settings.setSuddenDeathDelay(Integer.parseInt(params[2])); } else if (line.startsWith("RULES")) { String[] params = StringUtils.split(line.substring(5).trim(), ' '); settings.setStartingLevel(Integer.parseInt(params[0])); settings.setLinesPerLevel(Integer.parseInt(params[1])); settings.setLevelIncrease(Integer.parseInt(params[2])); settings.setLinesPerSpecial(Integer.parseInt(params[3])); settings.setSpecialAdded(Integer.parseInt(params[4])); settings.setSpecialCapacity(Integer.parseInt(params[5])); settings.setClassicRules(!"0".equals(params[6])); settings.setAverageLevels(!"0".equals(params[7])); } } } finally { // close the file if (in != null) { in.close(); } } } } } |
From: Emmanuel B. <sm...@us...> - 2005-05-10 02:13:09
|
Update of /cvsroot/jetrix/jetrix/src/java/net/jetrix/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31680 Modified Files: Special.java Log Message: Added valueOf(char) abd changed the type of the letter (String -> char) Index: Special.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/config/Special.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Special.java 5 Jan 2005 17:16:02 -0000 1.4 --- Special.java 10 May 2005 02:13:01 -0000 1.5 *************** *** 1,5 **** /** * Jetrix TetriNET Server ! * Copyright (C) 2004 Emmanuel Bourg * * This program is free software; you can redistribute it and/or --- 1,5 ---- /** * Jetrix TetriNET Server ! * Copyright (C) 2004-2005 Emmanuel Bourg * * This program is free software; you can redistribute it and/or *************** *** 34,52 **** public enum Special { ! ADDLINE(0, "a", "addline"), ! CLEARLINE(1, "c", "clearline"), ! NUKEFIELD(2, "n", "nukefield"), ! RANDOMCLEAR(3, "r", "randomclear"), ! SWITCHFIELD(4, "s", "switchfield"), ! CLEARSPECIAL(5, "b", "clearspecial"), ! GRAVITY(6, "g", "gravity"), ! QUAKEFIELD(7, "q", "quakefield"), ! BLOCKBOMB(8, "o", "blockbomb"); private int value; ! private String letter; private String code; ! Special(int value, String letter, String code) { this.value = value; --- 34,52 ---- public enum Special { ! ADDLINE(0, 'a', "addline"), ! CLEARLINE(1, 'c', "clearline"), ! NUKEFIELD(2, 'n', "nukefield"), ! RANDOMCLEAR(3, 'r', "randomclear"), ! SWITCHFIELD(4, 's', "switchfield"), ! CLEARSPECIAL(5, 'b', "clearspecial"), ! GRAVITY(6, 'g', "gravity"), ! QUAKEFIELD(7, 'q', "quakefield"), ! BLOCKBOMB(8, 'o', "blockbomb"); private int value; ! private final char letter; private String code; ! Special(int value, char letter, String code) { this.value = value; *************** *** 60,64 **** } ! public String getLetter() { return letter; --- 60,64 ---- } ! public char getLetter() { return letter; *************** *** 74,76 **** --- 74,95 ---- return Language.getText("command.config.specials." + code, locale); } + + /** + * Return the special matching the specified letter. + * + * @param letter the letter of the special + * @since 0.3 + */ + public static Special valueOf(char letter) + { + for (Special special : values()) + { + if (special.getLetter() == letter) + { + return special; + } + } + + return null; + } } |
From: Emmanuel B. <sm...@us...> - 2005-05-10 02:12:14
|
Update of /cvsroot/jetrix/jetrix/src/java/net/jetrix/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31542 Added Files: Puzzle.java Log Message: no message --- NEW FILE: Puzzle.java --- /** * Jetrix TetriNET Server * Copyright (C) 2005 Emmanuel Bourg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package net.jetrix.config; import net.jetrix.*; /** * A field with specific game settings. * * @since 0.3 * * @author Emmanuel Bourg * @version $Revision: 1.1 $, $Date: 2005/05/10 02:12:05 $ */ public class Puzzle { private Field field; private Settings settings; private String name; private String author; private String comment; private String key; public Field getField() { return field; } public void setField(Field field) { this.field = field; } public Settings getSettings() { return settings; } public void setSettings(Settings settings) { this.settings = settings; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public String getComment() { return comment; } public void setComment(String comment) { this.comment = comment; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } } |
From: Emmanuel B. <sm...@us...> - 2005-05-04 21:21:45
|
Update of /cvsroot/jetrix/jetrix/src/test/net/jetrix/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22166/filter Log Message: Directory /cvsroot/jetrix/jetrix/src/test/net/jetrix/filter added to the repository |
From: Emmanuel B. <sm...@us...> - 2005-05-04 21:16:17
|
Update of /cvsroot/jetrix/jetrix/src/etc/data/puzzle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20556/puzzle Log Message: Directory /cvsroot/jetrix/jetrix/src/etc/data/puzzle added to the repository |
From: Emmanuel B. <sm...@us...> - 2005-05-04 21:15:58
|
Update of /cvsroot/jetrix/jetrix/src/etc/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20499/data Log Message: Directory /cvsroot/jetrix/jetrix/src/etc/data added to the repository |
From: Emmanuel B. <sm...@us...> - 2005-05-04 21:14:29
|
Update of /cvsroot/jetrix/jetrix/src/java/net/jetrix/tools/patcher In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20175/src/java/net/jetrix/tools/patcher Modified Files: UpdateList.java Log Message: Renamed the crc file to update.crc Index: UpdateList.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/tools/patcher/UpdateList.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UpdateList.java 12 Jan 2005 18:56:30 -0000 1.1 --- UpdateList.java 4 May 2005 21:14:21 -0000 1.2 *************** *** 31,34 **** --- 31,36 ---- public class UpdateList { + private static final String CRC_FILE = "update.crc"; + private static String path; private static PrintWriter out; *************** *** 45,49 **** } ! out = new PrintWriter(new FileWriter(path + File.separator + "update.crc"), true); browseDirectory(new File(path)); --- 47,51 ---- } ! out = new PrintWriter(new FileWriter(path + File.separator + CRC_FILE), true); browseDirectory(new File(path)); *************** *** 70,74 **** String name = f.toString().substring(path.toString().length() + 1); ! if (!"update".equals(name)) { out.println(name + "\t" + getFileCRC32(f) + "\t" + f.length()); --- 72,76 ---- String name = f.toString().substring(path.toString().length() + 1); ! if (!CRC_FILE.equals(name)) { out.println(name + "\t" + getFileCRC32(f) + "\t" + f.length()); |
From: Emmanuel B. <sm...@us...> - 2005-05-04 21:13:16
|
Update of /cvsroot/jetrix/jetrix/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19809/doc Modified Files: changelog.txt Log Message: Added the #random channel Index: changelog.txt =================================================================== RCS file: /cvsroot/jetrix/jetrix/doc/changelog.txt,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** changelog.txt 4 May 2005 10:29:50 -0000 1.78 --- changelog.txt 4 May 2005 21:12:36 -0000 1.79 *************** *** 2,6 **** ================ - Changes in version 0.3 (2005-??-??) ----------------------------------- --- 2,5 ---- *************** *** 8,12 **** --- 7,13 ---- Player visible changes - New #survival channel (drop as many blocks as you can before you die) + - New #random channel, random settings when the game starts! - Implemented the channel operator access level. It's now possible to restrict some commands to the first player in the channel (/move, /start...) + - Added support for the client identification protocol (i.e lvl 0 0 request, clientinfo response) - The number of players and spectators currently online is now displayed on logging in *************** *** 17,23 **** --- 18,34 ---- Developer visible changes + - added a readLine(Reader) method in the Protocol interface - Renamed Client.receiveMessage() into Client.receive() + Changes in version 0.2.1 (2005-02-18) + ------------------------------------- + + - Fixed the Shutdown button on the server administration page + - Fixed a bug preventing the configuration files from being saved if the server was installed in a path containing a space character + - Running Jetrix with jetrix.exe no longer saturate the CPU + - Fixed a bug preventing the execution of several query commands with the same connection + + Changes in version 0.2 (2005-01-18) ----------------------------------- |
From: Emmanuel B. <sm...@us...> - 2005-05-04 21:12:58
|
Update of /cvsroot/jetrix/jetrix/src/java/net/jetrix/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19809/src/java/net/jetrix/filter Added Files: RandomFilter.java Log Message: Added the #random channel --- NEW FILE: RandomFilter.java --- /** * Jetrix TetriNET Server * Copyright (C) 2005 Emmanuel Bourg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package net.jetrix.filter; import java.util.*; import net.jetrix.messages.*; import net.jetrix.*; import net.jetrix.config.*; /** * A filter randomizing the blocks and the specials occurancies when the game starts. * * @since 0.3 * * @author Emmanuel Bourg * @version $Revision: 1.1 $, $Date: 2005/05/04 21:12:50 $ */ public class RandomFilter extends GenericFilter { public void onMessage(NewGameMessage m, List<Message> out) { // get the settings Settings settings = m.getSettings(); // randomize the block occurancies for (Block block : Block.values()) { settings.setOccurancy(block, (int) (Math.random() * 100)); } settings.normalizeBlockOccurancy(); for (Special special : Special.values()) { settings.setOccurancy(special, (int) (Math.random() * 100)); } settings.normalizeSpecialOccurancy(); // forward the new game message out.add(m); } } |
From: Emmanuel B. <sm...@us...> - 2005-05-04 21:12:58
|
Update of /cvsroot/jetrix/jetrix/src/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19809/src/etc Modified Files: channels.xml Log Message: Added the #random channel Index: channels.xml =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/etc/channels.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** channels.xml 23 Jan 2005 23:27:50 -0000 1.8 --- channels.xml 4 May 2005 21:12:38 -0000 1.9 *************** *** 24,27 **** --- 24,28 ---- <alias name="command" class="net.jetrix.filter.CommandFilter"/> <alias name="survival" class="net.jetrix.filter.SurvivalFilter"/> + <alias name="random" class="net.jetrix.filter.RandomFilter"/> </filter-definitions> *************** *** 165,168 **** --- 166,177 ---- </channel> + <channel name="random"> + <description>Random settings</description> + <topic>New game, new settings. Enjoy!</topic> + <filters> + <filter name="random"/> + </filters> + </channel> + <channel name="duel1"> <description>Duel 2:1</description> |
From: Emmanuel B. <sm...@us...> - 2005-05-04 11:01:04
|
Update of /cvsroot/jetrix/jetrix/src/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20906/src/admin Modified Files: server.jsp Log Message: more descriptive access level in the commands table Index: server.jsp =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/admin/server.jsp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** server.jsp 4 Apr 2005 09:36:14 -0000 1.21 --- server.jsp 4 May 2005 11:00:54 -0000 1.22 *************** *** 232,236 **** <td><%= usage %></td> <td><%= command.getDescription(conf.getLocale()) %></td> ! <td><%= command.getAccessLevel() %></td> <td><a href="/servlet/<%= ServerAction.class.getName() %>?action=command.remove&command=<%= command.getClass().getName() %>"><img src="images/delete16.png" alt="Remove" title="Remove" border="0" ></a></td> </tr> --- 232,246 ---- <td><%= usage %></td> <td><%= command.getDescription(conf.getLocale()) %></td> ! <td> ! <% ! switch (command.getAccessLevel()) { ! case AccessLevel.PLAYER: out.println("Player"); break; ! case AccessLevel.CHANNEL_OPERATOR: out.println("Channel Operator"); break; ! case AccessLevel.OPERATOR: out.println("Operator"); break; ! case AccessLevel.ADMINISTRATOR: out.println("Administrator"); break; ! default: out.println(command.getAccessLevel()); ! } ! %> ! </td> <td><a href="/servlet/<%= ServerAction.class.getName() %>?action=command.remove&command=<%= command.getClass().getName() %>"><img src="images/delete16.png" alt="Remove" title="Remove" border="0" ></a></td> </tr> |
From: Emmanuel B. <sm...@us...> - 2005-05-04 10:30:08
|
Update of /cvsroot/jetrix/jetrix/src/admin/WEB-INF/classes/net/jetrix/servlets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13938/src/admin/WEB-INF/classes/net/jetrix/servlets Modified Files: ChannelAction.java Log Message: Channels can now be created from the administration console Index: ChannelAction.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/admin/WEB-INF/classes/net/jetrix/servlets/ChannelAction.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ChannelAction.java 4 May 2005 08:57:41 -0000 1.5 --- ChannelAction.java 4 May 2005 10:29:52 -0000 1.6 *************** *** 24,27 **** --- 24,28 ---- import net.jetrix.Server; import net.jetrix.config.ChannelConfig; + import net.jetrix.config.Settings; import javax.servlet.ServletException; *************** *** 39,66 **** * @version $Revision$, $Date$ */ ! public class ChannelAction extends HttpServlet { ! ! protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String name = request.getParameter("name"); ! Channel channel = ChannelManager.getInstance().getChannel(name); ! ChannelConfig config = channel.getConfig(); ! String password = request.getParameter("password"); ! password = password == null ? null : password.trim(); ! password = "".equals(password) ? null : password; ! config.setDescription(request.getParameter("description")); ! config.setAccessLevel(Integer.parseInt(request.getParameter("accessLevel"))); ! config.setPassword(password); ! config.setMaxPlayers(max(0, min(6, Integer.parseInt(request.getParameter("maxPlayers"))))); ! config.setMaxSpectators(max(0, Integer.parseInt(request.getParameter("maxSpectators")))); ! config.setPersistent("true".equals(request.getParameter("persistent"))); ! config.setVisible("true".equals(request.getParameter("visible"))); ! config.setIdleAllowed("true".equals(request.getParameter("idle"))); ! config.setWinlistId(request.getParameter("winlist")); ! config.setTopic(request.getParameter("topic")); response.sendRedirect("/channel.jsp?name=" + name); --- 40,100 ---- * @version $Revision$, $Date$ */ ! public class ChannelAction extends HttpServlet ! { + protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { String name = request.getParameter("name"); + ChannelManager manager = ChannelManager.getInstance(); ! if ("new".equals(request.getParameter("action"))) ! { ! // create a new channel ! ChannelConfig config = new ChannelConfig(); ! config.setSettings(new Settings()); ! config.setDescription(""); ! // find a name for the channel ! int i = 1; ! while (name == null) ! { ! if (manager.getChannel("tetrinet" + i) == null) ! { ! name = "tetrinet" + i; ! } ! else ! { ! i++; ! } ! } ! config.setName(name); ! ! // spawn the channel ! manager.createChannel(config); ! } ! else ! { ! // update an existing channel ! Channel channel = manager.getChannel(name); ! ChannelConfig config = channel.getConfig(); + String password = request.getParameter("password"); + password = password == null ? null : password.trim(); + password = "".equals(password) ? null : password; + + config.setDescription(request.getParameter("description")); + config.setAccessLevel(Integer.parseInt(request.getParameter("accessLevel"))); + config.setPassword(password); + config.setMaxPlayers(max(0, min(6, Integer.parseInt(request.getParameter("maxPlayers"))))); + config.setMaxSpectators(max(0, Integer.parseInt(request.getParameter("maxSpectators")))); + config.setPersistent("true".equals(request.getParameter("persistent"))); + config.setVisible("true".equals(request.getParameter("visible"))); + config.setIdleAllowed("true".equals(request.getParameter("idle"))); + config.setWinlistId(request.getParameter("winlist")); + config.setTopic(request.getParameter("topic")); + } + + // redirect to the channel page response.sendRedirect("/channel.jsp?name=" + name); |
From: Emmanuel B. <sm...@us...> - 2005-05-04 10:30:08
|
Update of /cvsroot/jetrix/jetrix/src/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13938/src/admin Modified Files: navigation.jsp style.css Log Message: Channels can now be created from the administration console Index: style.css =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/admin/style.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** style.css 6 Dec 2004 00:00:38 -0000 1.4 --- style.css 4 May 2005 10:29:52 -0000 1.5 *************** *** 34,35 **** --- 34,37 ---- .default { color: gray; } .default:focus { color: black; } + + .icon-link { background-repeat: no-repeat; line-height: 16px; padding-left: 17px; text-decoration: none; font-size: small } Index: navigation.jsp =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/admin/navigation.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** navigation.jsp 17 Jan 2005 20:56:58 -0000 1.3 --- navigation.jsp 4 May 2005 10:29:52 -0000 1.4 *************** *** 2,5 **** --- 2,6 ---- <%@ page import="net.jetrix.config.*"%> <%@ page import="net.jetrix.filter.*"%> + <%@ page import="net.jetrix.servlets.*"%> <%@ page import="java.util.*"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> *************** *** 16,20 **** <body style="margin: 1em"> ! <button onclick="document.location.reload()">Refresh</button> <br><br> --- 17,22 ---- <body style="margin: 1em"> ! <a class="icon-link" href="javascript: document.location.reload()" style="background-image: url(/images/refresh16.png)">Refresh</a> ! <a class="icon-link" href="/servlet/<%= ChannelAction.class.getName() %>?action=new" target="content" style="background-image: url(/images/add16.png)">Add channel</a> <br><br> |
From: Emmanuel B. <sm...@us...> - 2005-05-04 10:30:08
|
Update of /cvsroot/jetrix/jetrix/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13938/doc Modified Files: changelog.txt todo.txt Log Message: Channels can now be created from the administration console Index: changelog.txt =================================================================== RCS file: /cvsroot/jetrix/jetrix/doc/changelog.txt,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** changelog.txt 4 May 2005 08:57:33 -0000 1.77 --- changelog.txt 4 May 2005 10:29:50 -0000 1.78 *************** *** 14,17 **** --- 14,18 ---- - Fixed a bug preventing the modification of the access level of a command when the "access-level" attribute was set on the <command> element - Added a visibility parameter on channels, it's now possible to have an invisible channel on the /list result + - Channels can now be created from the administration console Developer visible changes Index: todo.txt =================================================================== RCS file: /cvsroot/jetrix/jetrix/doc/todo.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** todo.txt 3 May 2005 11:45:59 -0000 1.2 --- todo.txt 4 May 2005 10:29:51 -0000 1.3 *************** *** 32,36 **** Administration - channel reordering from the admin console - - create a channel from the admin console - add a help button on the webadmin redirecting to the SF forum - winlist management in the admin console --- 32,35 ---- |
From: Emmanuel B. <sm...@us...> - 2005-05-04 10:25:24
|
Update of /cvsroot/jetrix/jetrix/src/java/net/jetrix/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12559/src/java/net/jetrix/config Modified Files: ServerConfig.java Log Message: Added the visibility parameter on the channel configuration Index: ServerConfig.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/config/ServerConfig.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** ServerConfig.java 28 Jan 2005 00:28:37 -0000 1.30 --- ServerConfig.java 4 May 2005 10:25:14 -0000 1.31 *************** *** 479,482 **** --- 479,487 ---- } + if (!config.isVisible()) + { + out.println(" <visible>false</visible>"); + } + if (config.getMaxPlayers() != ChannelConfig.PLAYER_CAPACITY) { |
From: Emmanuel B. <sm...@us...> - 2005-05-04 08:59:07
|
Update of /cvsroot/jetrix/jetrix/src/admin/WEB-INF/classes/net/jetrix/servlets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19427/src/admin/WEB-INF/classes/net/jetrix/servlets Modified Files: ChannelAction.java Log Message: Added the visibility parameter on the channel configuration Index: ChannelAction.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/admin/WEB-INF/classes/net/jetrix/servlets/ChannelAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChannelAction.java 15 Jan 2005 22:37:58 -0000 1.4 --- ChannelAction.java 4 May 2005 08:57:41 -0000 1.5 *************** *** 58,61 **** --- 58,62 ---- config.setMaxSpectators(max(0, Integer.parseInt(request.getParameter("maxSpectators")))); config.setPersistent("true".equals(request.getParameter("persistent"))); + config.setVisible("true".equals(request.getParameter("visible"))); config.setIdleAllowed("true".equals(request.getParameter("idle"))); config.setWinlistId(request.getParameter("winlist")); |
From: Emmanuel B. <sm...@us...> - 2005-05-04 08:59:07
|
Update of /cvsroot/jetrix/jetrix/src/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19427/src/admin Modified Files: channel.jsp Log Message: Added the visibility parameter on the channel configuration Index: channel.jsp =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/admin/channel.jsp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** channel.jsp 17 Jan 2005 20:56:56 -0000 1.14 --- channel.jsp 4 May 2005 08:57:41 -0000 1.15 *************** *** 86,89 **** --- 86,96 ---- </tr> <tr> + <td>Visible</td> + <td> + <label><input type="radio" value="true" name="visible" <%= conf.isVisible() ? "checked" : "" %>> Yes</label> + <label><input type="radio" value="false" name="visible" <%= conf.isVisible() ? "" : "checked" %>> No</label> + </td> + </tr> + <tr> <td>Idle Allowed</td> <td> |
From: Emmanuel B. <sm...@us...> - 2005-05-04 08:59:07
|
Update of /cvsroot/jetrix/jetrix/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19427/doc Modified Files: changelog.txt Log Message: Added the visibility parameter on the channel configuration Index: changelog.txt =================================================================== RCS file: /cvsroot/jetrix/jetrix/doc/changelog.txt,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** changelog.txt 3 May 2005 13:39:12 -0000 1.76 --- changelog.txt 4 May 2005 08:57:33 -0000 1.77 *************** *** 13,16 **** --- 13,17 ---- Admin visible changes - Fixed a bug preventing the modification of the access level of a command when the "access-level" attribute was set on the <command> element + - Added a visibility parameter on channels, it's now possible to have an invisible channel on the /list result Developer visible changes |
From: Emmanuel B. <sm...@us...> - 2005-05-04 08:58:44
|
Update of /cvsroot/jetrix/jetrix/src/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19427/src/etc Modified Files: tetrinet-channels.dtd Log Message: Added the visibility parameter on the channel configuration Index: tetrinet-channels.dtd =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/etc/tetrinet-channels.dtd,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tetrinet-channels.dtd 5 Jan 2005 01:05:05 -0000 1.3 --- tetrinet-channels.dtd 4 May 2005 08:57:42 -0000 1.4 *************** *** 90,94 **** <!ELEMENT channels (channel*)> <!ELEMENT channel (description?, topic?, password?, access-level?, idle?, ! max-players?, max-spectators?, winlist?, settings?, class?, filters?)> <!ATTLIST channel name CDATA #REQUIRED> <!ELEMENT description (#PCDATA)> --- 90,94 ---- <!ELEMENT channels (channel*)> <!ELEMENT channel (description?, topic?, password?, access-level?, idle?, ! visible?, max-players?, max-spectators?, winlist?, settings?, class?, filters?)> <!ATTLIST channel name CDATA #REQUIRED> <!ELEMENT description (#PCDATA)> |
From: Emmanuel B. <sm...@us...> - 2005-05-04 08:57:52
|
Update of /cvsroot/jetrix/jetrix/src/java/net/jetrix/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19427/src/java/net/jetrix/config Modified Files: ChannelConfig.java ChannelsRuleSet.java Log Message: Added the visibility parameter on the channel configuration Index: ChannelsRuleSet.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/config/ChannelsRuleSet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChannelsRuleSet.java 12 Dec 2004 02:04:29 -0000 1.4 --- ChannelsRuleSet.java 4 May 2005 08:57:43 -0000 1.5 *************** *** 83,86 **** --- 83,87 ---- digester.addCallMethod("*/channel/access-level", "setAccessLevel", 0, new Class[] {Integer.TYPE}); digester.addCallMethod("*/channel/idle", "setIdleAllowed", 0, new Class[] {Boolean.TYPE}); + digester.addCallMethod("*/channel/visible", "setVisible", 0, new Class[] {Boolean.TYPE}); digester.addCallMethod("*/channel/description", "setDescription", 0); digester.addCallMethod("*/channel/topic", "setTopic", 0); Index: ChannelConfig.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/config/ChannelConfig.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ChannelConfig.java 14 Dec 2004 02:24:44 -0000 1.10 --- ChannelConfig.java 4 May 2005 08:57:43 -0000 1.11 *************** *** 41,44 **** --- 41,45 ---- private String winlistId; private boolean idleAllowed; + private boolean visible = true; /** extended properties */ *************** *** 273,275 **** --- 274,286 ---- this.idleAllowed = idleAllowed; } + + public boolean isVisible() + { + return visible; + } + + public void setVisible(boolean visible) + { + this.visible = visible; + } } |
From: Emmanuel B. <sm...@us...> - 2005-05-04 08:57:51
|
Update of /cvsroot/jetrix/jetrix/src/java/net/jetrix/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19427/src/java/net/jetrix/commands Modified Files: ListCommand.java Log Message: Added the visibility parameter on the channel configuration Index: ListCommand.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/commands/ListCommand.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ListCommand.java 4 Apr 2005 09:36:16 -0000 1.13 --- ListCommand.java 4 May 2005 08:57:42 -0000 1.14 *************** *** 60,63 **** --- 60,69 ---- ChannelConfig conf = channel.getConfig(); + // skip invisible channels + if (!conf.isVisible()) + { + continue; + } + String cname = conf.getName(); while (cname.length() < 6) |
From: Emmanuel B. <sm...@us...> - 2005-05-03 17:30:16
|
Update of /cvsroot/jetrix/jetrix/src/java/net/jetrix/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31103/net/jetrix/commands Modified Files: IpCommand.java KickCommand.java ReplyCommand.java SummonCommand.java TeleportCommand.java TellCommand.java Log Message: Added a new constructor to PlineMessage Index: TeleportCommand.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/commands/TeleportCommand.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TeleportCommand.java 9 Dec 2004 12:35:19 -0000 1.15 --- TeleportCommand.java 3 May 2005 17:29:48 -0000 1.16 *************** *** 63,69 **** { // no player found ! PlineMessage response = new PlineMessage(); ! response.setKey("command.player_not_found", targetName); ! client.send(response); } else --- 63,67 ---- { // no player found ! client.send(new PlineMessage("command.player_not_found", targetName)); } else Index: SummonCommand.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/commands/SummonCommand.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** SummonCommand.java 9 Dec 2004 12:35:19 -0000 1.14 --- SummonCommand.java 3 May 2005 17:29:48 -0000 1.15 *************** *** 64,70 **** { // no player found ! PlineMessage response = new PlineMessage(); ! response.setKey("command.player_not_found", targetName); ! client.send(response); } else --- 64,68 ---- { // no player found ! client.send(new PlineMessage("command.player_not_found", targetName)); } else Index: TellCommand.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/commands/TellCommand.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** TellCommand.java 9 Dec 2004 12:35:19 -0000 1.19 --- TellCommand.java 3 May 2005 17:29:48 -0000 1.20 *************** *** 58,64 **** { // no player found ! PlineMessage response = new PlineMessage(); ! response.setKey("command.player_not_found", targetName); ! client.send(response); } else --- 58,62 ---- { // no player found ! client.send(new PlineMessage("command.player_not_found", targetName)); } else Index: KickCommand.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/commands/KickCommand.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** KickCommand.java 9 Dec 2004 12:35:04 -0000 1.14 --- KickCommand.java 3 May 2005 17:29:48 -0000 1.15 *************** *** 64,70 **** { // no player found ! PlineMessage response = new PlineMessage(); ! response.setKey("command.player_not_found", targetName); ! client.send(response); } else --- 64,68 ---- { // no player found ! client.send(new PlineMessage("command.player_not_found", targetName)); } else Index: ReplyCommand.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/commands/ReplyCommand.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ReplyCommand.java 16 Dec 2004 15:38:28 -0000 1.12 --- ReplyCommand.java 3 May 2005 17:29:48 -0000 1.13 *************** *** 68,74 **** { // previous user no longer connected ! PlineMessage response = new PlineMessage(); ! response.setKey("command.player_not_found", targetName); ! client.send(response); } else --- 68,72 ---- { // previous user no longer connected ! client.send(new PlineMessage("command.player_not_found", targetName)); } else Index: IpCommand.java =================================================================== RCS file: /cvsroot/jetrix/jetrix/src/java/net/jetrix/commands/IpCommand.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** IpCommand.java 9 Dec 2004 12:35:04 -0000 1.16 --- IpCommand.java 3 May 2005 17:29:47 -0000 1.17 *************** *** 63,69 **** { // no player found ! PlineMessage response = new PlineMessage(); ! response.setKey("command.player_not_found", targetName); ! client.send(response); } else --- 63,67 ---- { // no player found ! client.send(new PlineMessage("command.player_not_found", targetName)); } else |