[Cherbot-commit] SF.net SVN: cherbot: [55] trunk/src
Status: Alpha
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2007-06-09 17:19:24
|
Revision: 55
http://svn.sourceforge.net/cherbot/?rev=55&view=rev
Author: christianhujer
Date: 2007-06-09 10:19:23 -0700 (Sat, 09 Jun 2007)
Log Message:
-----------
Added skeleton CherBot + Test.
Added Paths:
-----------
trunk/src/net/sf/cherbot/CherBot.java
trunk/src/test/net/sf/cherbot/CherBotTest.java
Added: trunk/src/net/sf/cherbot/CherBot.java
===================================================================
--- trunk/src/net/sf/cherbot/CherBot.java (rev 0)
+++ trunk/src/net/sf/cherbot/CherBot.java 2007-06-09 17:19:23 UTC (rev 55)
@@ -0,0 +1,71 @@
+/*
+ * Copyright © 2007, Christian Hujer and the CherBot developers. All Rights Reserved.
+ * License: GNU General Public License v2.0 or newer.
+ * See file COPYING in the root directory of this project.
+ */
+
+package net.sf.cherbot;
+
+import net.sf.japi.io.args.BasicCommand;
+import net.sf.japi.io.args.ArgParser;
+import org.jetbrains.annotations.NotNull;
+import java.util.List;
+import java.io.OutputStream;
+import java.io.IOException;
+
+/** Main class of Cherbot.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class CherBot extends BasicCommand {
+
+ /** Main program.
+ * @param args Command line arguments (currently ignored).
+ */
+ public static void main(final String... args) {
+ ArgParser.simpleParseAndRun(new CherBot(), args);
+ }
+
+ private OutputStream out;
+
+ /** {@inheritDoc} */
+ public int run(@NotNull final List<String> strings) throws Exception {
+ return 0;
+ }
+
+ public void metaserver() throws IOException {
+ // read "62.75.224.80|177|daimonin.game-server.cc|52|0.9.7|This is the Daimonin 0.9.7 server.|0|0|0\n"
+ }
+
+ public void connect() throws IOException {
+ // write 0x00 0x29 "version 991023 991023 Daimonin SDL Client"
+ // read 0x00 0x1e 0x02 "991023 991023 Daimonin Server"
+ // write 0x00 0x99 "setup sound 1 map2 cmd 1 mapsize 17x17 darkness 1 facecache 1 skf 3386|dd257ea spf 2737|404f6ead bpf 227483|8ab2a06 stf 2253|16d49f0f amf 262790|ec2627ee"
+ // read 0x00 0x75 0x17 " sound 1 map2cmd 1 mapsize 17x17 darkness 1 facecache 1 skf OK spf OK bpf 227639|117ae13a stf OK amf 263415|ec0d5f79"
+ // write 0x00 0x04 "rf 4"
+ // read lots of data
+ // write 0x00 0x04 "rf 3"
+ // read lots of data
+ // write 0x00 0x05 "addme"
+ // read 0x00 0x06 0x18 "4 QN0" 0x00 0x01 0x15
+ // write 0x00 0x12 "reply LFoobuzzer49" // L not part of name
+ // read 0x00 0x06 0x18 "4 QP0"
+ // write 0x00 0x0E "reply xxxxxxxx"
+ // read 0x00 0x10 0x06 0x00 0x00 "Welcome Back!"
+ // read 0x00 0x24 0x06 0x00 0x00 "Cheristheus has entered the game."
+ // read 0x00 0x19 0x11 0x00 0x4e 0x01 0x60 0x00 0x02 0x27 0x2a 0x00 0x00 0x10 0xec 0x0b "Cheristheus"
+ // read lots of data
+ // read 0x00 0x16 0x05 0x00 0x07 0x02 0x42 0x21 0x80 0x01 "Cheristheus" 0x00 0x90 0xea
+ // read 0x00 0x16 0x05 0x00 0x07 0x02 0x42 0x21 0x80 0x01 "Cheristheus" 0x00 0x90 0xeb
+ // read 0x00 0x16 0x05 0x00 0x07 0x02 0x42 0x21 0x80 0x01 "Cheristheus" 0x00 0x90 0xec
+ // write 0x00 0x0d "ncom " 0x00 0x01 0xff 0xff 0xff 0xff "/n" // north
+ // write 0x00 0x0d "ncom " 0x00 0x02 0xff 0xff 0xff 0xff "/n" // north
+ // write 0x00 0x0d "ncom " 0x00 0x03 0xff 0xff 0xff 0xff "/e" // east
+ // write 0x00 0x0d "ncom " 0x00 0x04 0xff 0xff 0xff 0xff "/s" // south
+ // write 0x00 0x0d "ncom " 0x00 0x05 0xff 0xff 0xff 0xff "/w" // west
+ // write 0x00 0x0e "ncom " 0x00 0x06 0xff 0xff 0xff 0xff "/sw" // southwest
+ // write 0x00 0x0e "ncom " 0x00 0x07 0xff 0xff 0xff 0xff "/se" // southeast
+ // write 0x00 0x0e "ncom " 0x00 0x08 0xff 0xff 0xff 0xff "/nw" // northwest
+ // write 0x00 0x0e "ncom " 0x00 0x09 0xff 0xff 0xff 0xff "/ne" // northeast
+ // write 0x00 0x0f "ncom " 0x00 0x0A 0xff 0xff 0xff 0xff "/who" // /who
+ }
+} // class CherBot
Property changes on: trunk/src/net/sf/cherbot/CherBot.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
Added: trunk/src/test/net/sf/cherbot/CherBotTest.java
===================================================================
--- trunk/src/test/net/sf/cherbot/CherBotTest.java (rev 0)
+++ trunk/src/test/net/sf/cherbot/CherBotTest.java 2007-06-09 17:19:23 UTC (rev 55)
@@ -0,0 +1,21 @@
+/*
+ * Copyright © 2007, Christian Hujer and the CherBot developers. All Rights Reserved.
+ * License: GNU General Public License v2.0 or newer.
+ * See file COPYING in the root directory of this project.
+ */
+
+package test.net.sf.cherbot;
+
+import net.sf.cherbot.CherBot;
+import org.junit.Test;
+
+/** Unit-Test for {@link CherBot}
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class CherBotTest {
+
+ /** Tests whether {@link CherBot#run(java.util.List)} works. */
+ @Test public void testRun() {
+ }
+
+} // class CherBotTest
Property changes on: trunk/src/test/net/sf/cherbot/CherBotTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|