OpenSangokushi commit ML
sango****@lists*****
2010年 11月 11日 (木) 00:40:20 JST
Revision: 468 http://sourceforge.jp/projects/sangokushi/svn/view?view=rev&revision=468 Author: hryksbt Date: 2010-11-11 00:40:20 +0900 (Thu, 11 Nov 2010) Log Message: ----------- Ver.0.1.5 Added Paths: ----------- tags/Ver.0.1.5/ tags/Ver.0.1.5/OpenSangokushi/ tags/Ver.0.1.5/OpenSangokushi/.classpath tags/Ver.0.1.5/OpenSangokushi/.project tags/Ver.0.1.5/OpenSangokushi/.settings/ tags/Ver.0.1.5/OpenSangokushi/AndroidManifest.xml tags/Ver.0.1.5/OpenSangokushi/assets/ tags/Ver.0.1.5/OpenSangokushi/bin/ tags/Ver.0.1.5/OpenSangokushi/bin/OpenSangokushi.apk tags/Ver.0.1.5/OpenSangokushi/bin/classes.dex tags/Ver.0.1.5/OpenSangokushi/bin/jp/ tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/ tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/ tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/ tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$1.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$2.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$3.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$GetHashTagTimelineTask.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$HashTagSelector.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$PostTask.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Initialization$1.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Initialization$2.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Initialization.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$MyClickAdapter$1.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$MyClickAdapter$2.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$MyClickAdapter.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$battle_Status.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$1.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$2.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$3.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$4.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$5.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$DownloadImageTask.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$anim.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$attr.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$color.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$drawable.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$id.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$layout.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$raw.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$string.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/SangokushiPreferences.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/dummy/ tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/dummy/DummyMapData.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/ tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/AuthenticateCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/BattleCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/BattleResultCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/CountryStateCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/EnteringLobbyCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/HttpClient.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/HttpCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/HttpRunnable.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/InitializeCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LeavingLobbyCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LobbyInfoCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LobbyStatusCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LoginCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/ResponceHandler.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/RoomInfoCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/UserStatusCommand.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/model/ tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/model/Player.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/ tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TweetArrayAdapter$ViewHolder.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TweetArrayAdapter.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TweetItem.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterCredentialRunnable.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterJSON.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterOAuth.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterOperator.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterRunnable.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterUserStatusRunnable.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatPopupWindow.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$1.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$2.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$3.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$4.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapStaticView.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView$1$1.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView$1.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView$2.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView.class tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/WholeMapView.class tags/Ver.0.1.5/OpenSangokushi/bin/resources.ap_ tags/Ver.0.1.5/OpenSangokushi/default.properties tags/Ver.0.1.5/OpenSangokushi/gen/ tags/Ver.0.1.5/OpenSangokushi/gen/jp/ tags/Ver.0.1.5/OpenSangokushi/gen/jp/or/ tags/Ver.0.1.5/OpenSangokushi/gen/jp/or/cute/ tags/Ver.0.1.5/OpenSangokushi/gen/jp/or/cute/sangokushi/ tags/Ver.0.1.5/OpenSangokushi/gen/jp/or/cute/sangokushi/R.java tags/Ver.0.1.5/OpenSangokushi/libs/ tags/Ver.0.1.5/OpenSangokushi/libs/signpost-commonshttp4-1.2.jar tags/Ver.0.1.5/OpenSangokushi/libs/signpost-core-1.2.jar tags/Ver.0.1.5/OpenSangokushi/res/ tags/Ver.0.1.5/OpenSangokushi/res/anim/ tags/Ver.0.1.5/OpenSangokushi/res/anim/logo_scale.xml tags/Ver.0.1.5/OpenSangokushi/res/drawable/ tags/Ver.0.1.5/OpenSangokushi/res/drawable/castle.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/desert.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/forest.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/gi.PNG tags/Ver.0.1.5/OpenSangokushi/res/drawable/gi_bg.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/go.PNG tags/Ver.0.1.5/OpenSangokushi/res/drawable/go_bg.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/grass.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/icon.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/king.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/king_back.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/loading.gif tags/Ver.0.1.5/OpenSangokushi/res/drawable/logo.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/map_draft.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/mountain.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/openingback.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/player.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/player_back.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/street.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/syoku.PNG tags/Ver.0.1.5/OpenSangokushi/res/drawable/syoku_bg.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/tree.png tags/Ver.0.1.5/OpenSangokushi/res/drawable/water.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-hdpi/ tags/Ver.0.1.5/OpenSangokushi/res/drawable-hdpi/icon.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/ tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/castle.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/desert.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/dra.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/forest.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/grass.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/icon.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/loading.gif tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/logo.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/mountain.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/openingback.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/player.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/street.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/tree.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/water.png tags/Ver.0.1.5/OpenSangokushi/res/drawable-mdpi/ tags/Ver.0.1.5/OpenSangokushi/res/drawable-mdpi/icon.png tags/Ver.0.1.5/OpenSangokushi/res/layout/ tags/Ver.0.1.5/OpenSangokushi/res/layout/battle.xml tags/Ver.0.1.5/OpenSangokushi/res/layout/initialization.xml tags/Ver.0.1.5/OpenSangokushi/res/layout/list.xml tags/Ver.0.1.5/OpenSangokushi/res/layout/lobby.xml tags/Ver.0.1.5/OpenSangokushi/res/layout/main.xml tags/Ver.0.1.5/OpenSangokushi/res/layout/map.xml tags/Ver.0.1.5/OpenSangokushi/res/layout/opening.xml tags/Ver.0.1.5/OpenSangokushi/res/layout/popup.xml tags/Ver.0.1.5/OpenSangokushi/res/layout/tweetlist.xml tags/Ver.0.1.5/OpenSangokushi/res/raw/ tags/Ver.0.1.5/OpenSangokushi/res/raw/bgm.mp3 tags/Ver.0.1.5/OpenSangokushi/res/values/ tags/Ver.0.1.5/OpenSangokushi/res/values/colors.xml tags/Ver.0.1.5/OpenSangokushi/res/values/strings.xml tags/Ver.0.1.5/OpenSangokushi/res/values-ja/ tags/Ver.0.1.5/OpenSangokushi/res/values-ja/colors.xml tags/Ver.0.1.5/OpenSangokushi/res/values-ja/strings.xml tags/Ver.0.1.5/OpenSangokushi/src/ tags/Ver.0.1.5/OpenSangokushi/src/jp/ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Battle.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Initialization.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Lobby.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Opening.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/SangokushiPreferences.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/dummy/ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/dummy/DummyMapData.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/AuthenticateCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/BattleCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/BattleResultCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/CountryStateCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/EnteringLobbyCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpClient.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpRunnable.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/InitializeCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LeavingLobbyCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LobbyInfoCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LobbyStatusCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LoginCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/ResponceHandler.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/RoomInfoCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/UserStatusCommand.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/model/ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/model/Player.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TweetArrayAdapter.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TweetItem.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterCredentialRunnable.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterJSON.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterOAuth.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterOperator.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterRunnable.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterUserStatusRunnable.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/ChatPopupWindow.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/ChatView.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/MapStaticView.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/MapView.java tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/WholeMapView.java tags/Ver.0.1.5/Server/ tags/Ver.0.1.5/Server/DBä½ææé .txt tags/Ver.0.1.5/Server/Openä¸å½å¿ä½¿ç¨è¨±è«¾.txt tags/Ver.0.1.5/Server/SQL/ tags/Ver.0.1.5/Server/SQL/databaseSQL.txt tags/Ver.0.1.5/Server/SQL/dump.sql tags/Ver.0.1.5/Server/SQL/grantSQL.txt tags/Ver.0.1.5/Server/Ver.0.1.5.tar.gz tags/Ver.0.1.5/Server/server_php/ tags/Ver.0.1.5/Server/server_php/AI.php tags/Ver.0.1.5/Server/server_php/battleCalc.php tags/Ver.0.1.5/Server/server_php/checkLib.php tags/Ver.0.1.5/Server/server_php/dbparam.inc tags/Ver.0.1.5/Server/server_php/dbutil.php tags/Ver.0.1.5/Server/server_php/dbutil.php.bak2 tags/Ver.0.1.5/Server/server_php/entryNewUser.php tags/Ver.0.1.5/Server/server_php/getAICharParam.php tags/Ver.0.1.5/Server/server_php/getBattleResult.php tags/Ver.0.1.5/Server/server_php/getIniUserParam.php tags/Ver.0.1.5/Server/server_php/getMapInfo.php tags/Ver.0.1.5/Server/server_php/getRoomInfo.php tags/Ver.0.1.5/Server/server_php/getRoomStatus.php tags/Ver.0.1.5/Server/server_php/getRoomTurnCount.php tags/Ver.0.1.5/Server/server_php/getUserStatus.php tags/Ver.0.1.5/Server/server_php/getcountry.php tags/Ver.0.1.5/Server/server_php/index.php tags/Ver.0.1.5/Server/server_php/login.php tags/Ver.0.1.5/Server/server_php/main.php tags/Ver.0.1.5/Server/server_php/sessionException.php tags/Ver.0.1.5/Server/server_php/setBattleInfo.php tags/Ver.0.1.5/Server/server_php/setUserEntryRoom.php tags/Ver.0.1.5/Server/server_php/setUserExitRoom.php tags/Ver.0.1.5/Server/server_php/sysparam.inc tags/Ver.0.1.5/Server/server_php/table_t_login.txt tags/Ver.0.1.5/Server/server_php/turntimer.php tags/Ver.0.1.5/Server/ä¸å½å¿ãµã¼ãã¤ã³ã¹ãã¼ã«æé _CentOS5_32.txt tags/Ver.0.1.5/Server/ä¸å½å¿ãµã¼ãã¤ã³ã¹ãã¼ã«æé _CentOS5_64.txt Added: tags/Ver.0.1.5/OpenSangokushi/.classpath =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/.classpath (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/.classpath 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> + <classpathentry kind="lib" path="libs/signpost-commonshttp4-1.2.jar"/> + <classpathentry kind="lib" path="libs/signpost-core-1.2.jar"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="gen"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: tags/Ver.0.1.5/OpenSangokushi/.project =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/.project (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/.project 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>OpenSangokushi</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>com.android.ide.eclipse.adt.ApkBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>com.android.ide.eclipse.adt.AndroidNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Added: tags/Ver.0.1.5/OpenSangokushi/AndroidManifest.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/AndroidManifest.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/AndroidManifest.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="jp.or.cute.sangokushi" + android:versionCode="1" + android:versionName="1.0"> + <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"> + <activity android:name=".Opening" + android:label="@string/app_name" android:screenOrientation="portrait"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + + + <activity android:name=".twitter.TwitterOAuth"> + <intent-filter> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + <category android:name="android.intent.category.BROWSABLE" /> + <data android:scheme="twitter-oauth" android:host="sangokushi" /> + </intent-filter> + </activity> + <activity android:name="Lobby" android:screenOrientation="portrait"> + <intent-filter> + <action android:name="android.intent.action.VIEW" /> + </intent-filter> + </activity> + <activity android:name="Battle" android:screenOrientation="portrait"> + <intent-filter> + <action android:name="android.intent.action.VIEW" /> + </intent-filter> + </activity> +<activity android:name="Initialization"></activity> +</application> + <uses-sdk android:minSdkVersion="4" /> + +<uses-permission android:name="android.permission.INTERNET"></uses-permission> +<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission> +</manifest> \ No newline at end of file Added: tags/Ver.0.1.5/OpenSangokushi/bin/OpenSangokushi.apk =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/OpenSangokushi.apk ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/classes.dex =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/classes.dex ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$1.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$1.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$2.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$2.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$3.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$3.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$GetHashTagTimelineTask.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$GetHashTagTimelineTask.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$HashTagSelector.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$HashTagSelector.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$PostTask.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle$PostTask.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Battle.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Initialization$1.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Initialization$1.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Initialization$2.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Initialization$2.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Initialization.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Initialization.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$MyClickAdapter$1.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$MyClickAdapter$1.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$MyClickAdapter$2.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$MyClickAdapter$2.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$MyClickAdapter.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$MyClickAdapter.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$battle_Status.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby$battle_Status.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Lobby.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$1.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$1.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$2.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$2.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$3.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$3.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$4.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$4.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$5.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$5.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$DownloadImageTask.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening$DownloadImageTask.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/Opening.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$anim.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$anim.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$attr.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$attr.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$color.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$color.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$drawable.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$drawable.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$id.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$id.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$layout.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$layout.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$raw.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$raw.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$string.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R$string.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/R.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/SangokushiPreferences.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/SangokushiPreferences.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/dummy/DummyMapData.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/dummy/DummyMapData.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/AuthenticateCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/AuthenticateCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/BattleCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/BattleCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/BattleResultCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/BattleResultCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/CountryStateCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/CountryStateCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/EnteringLobbyCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/EnteringLobbyCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/HttpClient.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/HttpClient.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/HttpCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/HttpCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/HttpRunnable.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/HttpRunnable.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/InitializeCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/InitializeCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LeavingLobbyCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LeavingLobbyCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LobbyInfoCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LobbyInfoCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LobbyStatusCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LobbyStatusCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LoginCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/LoginCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/ResponceHandler.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/ResponceHandler.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/RoomInfoCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/RoomInfoCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/UserStatusCommand.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/httpclient/UserStatusCommand.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/model/Player.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/model/Player.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TweetArrayAdapter$ViewHolder.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TweetArrayAdapter$ViewHolder.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TweetArrayAdapter.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TweetArrayAdapter.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TweetItem.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TweetItem.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterCredentialRunnable.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterCredentialRunnable.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterJSON.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterJSON.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterOAuth.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterOAuth.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterOperator.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterOperator.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterRunnable.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterRunnable.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterUserStatusRunnable.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/twitter/TwitterUserStatusRunnable.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatPopupWindow.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatPopupWindow.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$1.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$1.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$2.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$2.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$3.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$3.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$4.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView$4.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/ChatView.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapStaticView.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapStaticView.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView$1$1.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView$1$1.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView$1.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView$1.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView$2.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView$2.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/MapView.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/WholeMapView.class =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/jp/or/cute/sangokushi/view/WholeMapView.class ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/bin/resources.ap_ =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/bin/resources.ap_ ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/default.properties =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/default.properties (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/default.properties 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,13 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "build.properties", and override values to adapt the script to your +# project structure. + +# Indicates whether an apk should be generated for each density. +split.density=false +# Project target. +target=android-4 Added: tags/Ver.0.1.5/OpenSangokushi/gen/jp/or/cute/sangokushi/R.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/gen/jp/or/cute/sangokushi/R.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/gen/jp/or/cute/sangokushi/R.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,144 @@ +/* AUTO-GENERATED FILE. DO NOT MODIFY. + * + * This class was automatically generated by the + * aapt tool from the resource data it found. It + * should not be modified by hand. + */ + +package jp.or.cute.sangokushi; + +public final class R { + public static final class anim { + public static final int logo_scale=0x7f040000; + } + public static final class attr { + } + public static final class color { + public static final int solid_blue=0x7f060001; + public static final int solid_green=0x7f060002; + public static final int solid_red=0x7f060000; + public static final int solid_white=0x7f060004; + public static final int solid_yellow=0x7f060003; + public static final int start_button=0x7f060005; + } + public static final class drawable { + public static final int castle=0x7f020000; + public static final int desert=0x7f020001; + public static final int dra=0x7f020002; + public static final int forest=0x7f020003; + public static final int gi=0x7f020004; + public static final int gi_bg=0x7f020005; + public static final int go=0x7f020006; + public static final int go_bg=0x7f020007; + public static final int grass=0x7f020008; + public static final int icon=0x7f020009; + public static final int king=0x7f02000a; + public static final int king_back=0x7f02000b; + public static final int loading=0x7f02000c; + public static final int logo=0x7f02000d; + public static final int map_draft=0x7f02000e; + public static final int mountain=0x7f02000f; + public static final int openingback=0x7f020010; + public static final int player=0x7f020011; + public static final int player_back=0x7f020012; + public static final int street=0x7f020013; + public static final int syoku=0x7f020014; + public static final int syoku_bg=0x7f020015; + public static final int tree=0x7f020016; + public static final int water=0x7f020017; + } + public static final class id { + public static final int Button01=0x7f080025; + public static final int ChatView=0x7f080007; + public static final int EditText01=0x7f080024; + public static final int LinearLayout01=0x7f080000; + public static final int LinearLayout02=0x7f080001; + public static final int LinearLayout03=0x7f08000a; + public static final int LinearLayout04=0x7f080002; + public static final int LinearLayout06=0x7f080014; + public static final int ListView01=0x7f080015; + public static final int MapView=0x7f080008; + public static final int ScrollView01=0x7f08001e; + public static final int StatusDetailView=0x7f080009; + public static final int StatusView=0x7f080005; + public static final int TableLayout01=0x7f080017; + public static final int TableRow01=0x7f080018; + public static final int TableRow02=0x7f080019; + public static final int TableRow03=0x7f08001b; + public static final int TextView01=0x7f08000b; + public static final int TextView02=0x7f080003; + public static final int TextView03=0x7f080004; + public static final int TextView04=0x7f08001a; + public static final int TextView05=0x7f08001c; + public static final int TextView06=0x7f08001d; + public static final int Title01=0x7f080012; + public static final int Title02=0x7f080013; + public static final int TweetListView=0x7f080026; + public static final int WholeMap=0x7f080006; + public static final int edittext_name=0x7f08000e; + public static final int lobby_button=0x7f080023; + public static final int loginBtn=0x7f080011; + public static final int logo=0x7f08001f; + public static final int map=0x7f080016; + public static final int name=0x7f08000d; + public static final int presetBtn=0x7f080010; + public static final int serif=0x7f08000f; + public static final int start_button=0x7f080021; + public static final int title=0x7f08000c; + public static final int tweet_name=0x7f080027; + public static final int tweet_tweet=0x7f080028; + public static final int twitter_button=0x7f080022; + public static final int twitter_image=0x7f080020; + } + public static final class layout { + public static final int battle=0x7f030000; + public static final int initialization=0x7f030001; + public static final int list=0x7f030002; + public static final int lobby=0x7f030003; + public static final int main=0x7f030004; + public static final int map=0x7f030005; + public static final int opening=0x7f030006; + public static final int popup=0x7f030007; + public static final int tweetlist=0x7f030008; + } + public static final class raw { + public static final int bgm=0x7f050000; + } + public static final class string { + public static final int app_name=0x7f070000; + public static final int auth_progress_text=0x7f070008; + public static final int auth_progress_title=0x7f070007; + public static final int authenticate_button=0x7f070003; + public static final int authenticated=0x7f070005; + public static final int bad_value=0x7f070006; + public static final int cancel=0x7f070019; + public static final int chat_edit_hint=0x7f07000c; + public static final int commander=0x7f07001c; + public static final int compete=0x7f07001a; + public static final int game_user=0x7f07001d; + public static final int general=0x7f07001b; + public static final int login_button=0x7f07000e; + public static final int login_settings=0x7f07000d; + public static final int menu_reset_userstate=0x7f07001f; + public static final int menu_reset_userstate_comlplatemessage=0x7f070020; + public static final int menu_reset_userstate_notregistered=0x7f070021; + public static final int not_authenticated=0x7f070004; + public static final int ok=0x7f070018; + public static final int opening_message=0x7f070001; + public static final int send=0x7f07000b; + public static final int start_button=0x7f070002; + public static final int title=0x7f070022; + public static final int title_initialization=0x7f070009; + public static final int title_start=0x7f07000a; + public static final int tweet_error=0x7f07001e; + public static final int tweet_progress_text=0x7f070017; + public static final int tweet_progress_title=0x7f070016; + public static final int twitter_id=0x7f070011; + public static final int twitter_id_summary=0x7f070012; + public static final int twitter_key_edit_hint=0x7f07000f; + public static final int twitter_notauth_message=0x7f070015; + public static final int twitter_password=0x7f070013; + public static final int twitter_password_summary=0x7f070014; + public static final int twitter_secret_edit_hint=0x7f070010; + } +} Added: tags/Ver.0.1.5/OpenSangokushi/libs/signpost-commonshttp4-1.2.jar =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/libs/signpost-commonshttp4-1.2.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/libs/signpost-core-1.2.jar =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/libs/signpost-core-1.2.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/anim/logo_scale.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/anim/logo_scale.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/anim/logo_scale.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<scale xmlns:android="http://schemas.android.com/apk/res/android" + android:fromXScale="1.0" + android:toXScale="10.0" + android:fromYScale="1.0" + android:toYScale="10.0" + android:pivotX="50%" + android:pivotY="0" + android.filterAfter="false" + android:duration="10000" + android:repeatMode="restart" /> Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/castle.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/castle.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/desert.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/desert.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/forest.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/forest.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/gi.PNG =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/gi.PNG ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/gi_bg.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/gi_bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/go.PNG =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/go.PNG ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/go_bg.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/go_bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/grass.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/grass.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/icon.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/icon.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/king.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/king.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/king_back.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/king_back.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/loading.gif =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/loading.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/logo.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/map_draft.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/map_draft.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/mountain.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/mountain.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/openingback.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/openingback.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/player.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/player.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/player_back.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/player_back.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/street.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/street.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/syoku.PNG =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/syoku.PNG ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/syoku_bg.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/syoku_bg.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/tree.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/tree.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable/water.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable/water.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-hdpi/icon.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-hdpi/icon.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/castle.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/castle.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/desert.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/desert.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/dra.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/dra.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/forest.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/forest.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/grass.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/grass.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/icon.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/icon.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/loading.gif =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/loading.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/logo.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/mountain.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/mountain.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/openingback.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/openingback.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/player.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/player.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/street.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/street.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/tree.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/tree.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/water.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-ldpi/water.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/drawable-mdpi/icon.png =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/drawable-mdpi/icon.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/layout/battle.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/layout/battle.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/layout/battle.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + > +<LinearLayout android:id="@+id/LinearLayout01" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="80dip"> + <LinearLayout android:id="@+id/LinearLayout02" android:orientation="vertical" android:layout_height="fill_parent" android:layout_width="240dip"> + <LinearLayout android:id="@+id/LinearLayout04" android:layout_height="wrap_content" android:layout_width="fill_parent" android:orientation="horizontal"><TextView android:id="@+id/TextView02" android:layout_height="wrap_content" android:text="夷éµã®æ¦ã" android:textSize="24px" android:background="@color/solid_yellow" android:textColor="@color/solid_blue" android:layout_width="wrap_content"></TextView><TextView android:id="@+id/TextView03" android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="ï¼æ¥ç®"></TextView> +</LinearLayout> + <TextView android:text="æ¹æè» ç·å µå ä¸ä¸ä¹åäºå å\nããã ç·ã¦ãããæ° äºå ã¦ããã\nå«æ¨©è» ç·å µå äºä¸ä¹ä¸åå å\nããã ç·ã¦ãããæ° åå «ã¦ããã" android:width="360dip" android:layout_height="fill_parent" android:layout_width="fill_parent" android:textSize="12dip" android:id="@+id/StatusView"></TextView> + + +</LinearLayout> + <jp.or.cute.sangokushi.view.WholeMapView android:layout_height="80dip" android:layout_width="80dip" android:background="@color/solid_red" android:id="@+id/WholeMap"></jp.or.cute.sangokushi.view.WholeMapView> + +</LinearLayout> +<jp.or.cute.sangokushi.view.ChatView android:layout_width="fill_parent" android:layout_height="53dip" android:background="@color/solid_white" android:id="@+id/ChatView" android:text="æ¹æ>>ããã«ã¡ã¯ï¼\nå¤ä¾¯æ>>ãããã" android:clickable="true"></jp.or.cute.sangokushi.view.ChatView> +<jp.or.cute.sangokushi.view.MapView android:clickable="true" android:focusable="true" android:focusableInTouchMode="true" android:layout_height="320dip" android:layout_width="320dip" android:id="@+id/MapView"></jp.or.cute.sangokushi.view.MapView> +<TextView android:layout_width="fill_parent" android:scrollbars="vertical" android:layout_height="48dip" android:id="@+id/StatusDetailView" android:text="é¸æå°ã®è©³ç´°æ å ±"></TextView> +<LinearLayout android:id="@+id/LinearLayout03" android:layout_width="fill_parent" android:gravity="right" android:layout_height="fill_parent" android:background="@color/solid_white"> +<TextView android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="fill_parent" android:textColor="@color/solid_blue" android:text="æ®ã60æ¥"></TextView> +</LinearLayout> + + + + + + +</LinearLayout> Added: tags/Ver.0.1.5/OpenSangokushi/res/layout/initialization.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/layout/initialization.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/layout/initialization.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="utf-8" ?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:background="#000000" android:layout_width="fill_parent" android:layout_height="fill_parent"> + + + + + + + + <TextView android:text="ã¦ã¼ã¶ã¼ç»é²" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="30px" + android:padding="5px" + android:textColor="@color/solid_white" + android:typeface="serif" +android:id="@+id/title"/> +<TextView android:text="åå" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="30px" + android:padding="5px" + android:textColor="@color/solid_white" + android:typeface="serif" +android:id="@+id/name"/> + + + <EditText android:text="" + android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/edittext_name"/> + + + + + + +<TextView android:id="@+id/serif" + android:text="æå±å¢åã®æ±ºå®" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="30px" + android:padding="5px" + android:textColor="@color/solid_white" + android:typeface="serif" +/> + + + <ImageButton android:src="@drawable/dra" + android:layout_width="wrap_content" android:layout_gravity="center_horizontal" +android:background="@color/start_button" + android:layout_height="wrap_content" android:id="@+id/presetBtn"/> + + +<TextView android:id="@+id/serif" + android:text="åå ãã" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="30px" + android:padding="5px" + android:textColor="@color/solid_white" + android:typeface="serif" +/> + + <ImageButton android:src="@drawable/dra" + android:layout_width="wrap_content" android:layout_gravity="center_horizontal" + android:background="@color/start_button" + android:layout_height="wrap_content" android:id="@+id/loginBtn"/> + + +</LinearLayout> + + Added: tags/Ver.0.1.5/OpenSangokushi/res/layout/list.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/layout/list.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/layout/list.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<TextView + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:padding="3dip" +/> Added: tags/Ver.0.1.5/OpenSangokushi/res/layout/lobby.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/layout/lobby.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/layout/lobby.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + +<LinearLayout android:id="@+id/LinearLayout01" + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="30dip"> + <TextView android:layout_height="wrap_content" android:text="Open" android:textSize="25px" android:textColor="@color/solid_blue" android:layout_width="wrap_content" android:id="@+id/Title01"></TextView> + <TextView android:layout_width="wrap_content" android:layout_height="fill_parent" android:textSize="30px" android:textColor="@color/solid_blue" android:text="ä¸å½å¿ ããã¼" android:id="@+id/Title02"></TextView> +</LinearLayout> + +<LinearLayout android:id="@+id/LinearLayout06" android:layout_width="wrap_content" android:layout_height="wrap_content"> + <ListView android:id="@+id/ListView01" android:layout_height="wrap_content" android:layout_width="200dip"></ListView> +</LinearLayout> + +<ImageView android:id="@+id/map" android:src="@drawable/gi_bg" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:scaleType="fitCenter"></ImageView> + +<LinearLayout android:id="@+id/LinearLayout03" android:layout_width="fill_parent" android:layout_height="fill_parent" > + +<TableLayout android:id="@+id/TableLayout01" android:layout_width="wrap_content" android:layout_height="wrap_content"> +<TableRow android:id="@+id/TableRow01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="10dip" android:layout_marginLeft="10dip"> +<TextView android:text="User name" android:textSize="25px" android:id="@+id/TextView01" android:layout_height="wrap_content" android:layout_width="100dip"></TextView> +<TextView android:text="æ¦æ´" android:textSize="25px" android:id="@+id/TextView02" android:layout_height="wrap_content" android:layout_width="100dip"></TextView> +</TableRow> + +<TableRow android:id="@+id/TableRow02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dip"> +<TextView android:text=" åå©" android:textSize="20px" android:id="@+id/TextView03" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> +<TextView android:text="0å" android:textSize="20px" android:id="@+id/TextView04" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> +</TableRow> + +<TableRow android:id="@+id/TableRow03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dip"> +<TextView android:text=" æå" android:textSize="20px" android:id="@+id/TextView05" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> +<TextView android:text="0å " android:textSize="20px" android:id="@+id/TextView06" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> +</TableRow> +</TableLayout> + +</LinearLayout> +</LinearLayout> + + Added: tags/Ver.0.1.5/OpenSangokushi/res/layout/main.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/layout/main.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/layout/main.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + > +<TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/app_name" + /> +</LinearLayout> Added: tags/Ver.0.1.5/OpenSangokushi/res/layout/map.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/layout/map.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/layout/map.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<ScrollView android:id="@+id/ScrollView01" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:layout_width="fill_parent"> + +</ScrollView> Added: tags/Ver.0.1.5/OpenSangokushi/res/layout/opening.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/layout/opening.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/layout/opening.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="fill_parent" android:background="@drawable/openingback" android:orientation="vertical"> + <ImageView android:id="@+id/logo" + android:src="@drawable/logo" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center_horizontal" android:scaleType="fitCenter"/> + <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/twitter_image" android:layout_gravity="center_vertical" android:visibility="invisible"></ImageView> + <Button + android:id="@+id/start_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="30px" + android:padding="5px" + android:layout_gravity="center_horizontal" + android:textColor="@color/solid_white" + android:layout_marginTop="270dp" android:text="@string/start_button" android:background="#00000000"></Button> + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="30px" + android:padding="5px" + android:layout_gravity="center_horizontal" + android:textColor="@color/solid_white" + android:text="@string/authenticate_button" android:id="@+id/twitter_button" android:layout_marginTop="5dp" android:background="#00000000"></Button> + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="30px" + android:padding="5px" + android:layout_gravity="center_horizontal" + android:textColor="@color/solid_white" + android:text="@string/login_button" android:id="@+id/lobby_button" android:layout_marginTop="5dp" android:background="#00000000"></Button> + + +</LinearLayout> \ No newline at end of file Added: tags/Ver.0.1.5/OpenSangokushi/res/layout/popup.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/layout/popup.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/layout/popup.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" android:layout_height="fill_parent"> +<LinearLayout android:id="@+id/LinearLayout01" android:layout_width="wrap_content" android:layout_height="wrap_content"> +<EditText android:id="@+id/EditText01" android:hint="@string/chat_edit_hint" android:layout_height="wrap_content" android:layout_width="fill_parent" android:editable="true"></EditText> +<Button android:id="@+id/Button01" android:layout_height="wrap_content" android:text="@string/send" android:layout_width="80dp"></Button> +</LinearLayout> +<ListView android:layout_width="wrap_content" android:layout_height="320dip" android:id="@+id/TweetListView"></ListView> +</LinearLayout> Added: tags/Ver.0.1.5/OpenSangokushi/res/layout/tweetlist.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/layout/tweetlist.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/layout/tweetlist.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8" ?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="fill_parent" android:background="#00000000"> + +<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/tweet_name" android:tag="tweet_name" android:background="#00000000" android:textColor="#ffffff" android:textSize="14dp"></TextView> +<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/tweet_tweet" android:tag="tweet_tweet" android:textSize="14dp" android:textColor="#ffffff" android:background="#00000000"></TextView> +</LinearLayout> + + Added: tags/Ver.0.1.5/OpenSangokushi/res/raw/bgm.mp3 =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/OpenSangokushi/res/raw/bgm.mp3 ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/OpenSangokushi/res/values/colors.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/values/colors.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/values/colors.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="solid_red">#f00</color> + <color name="solid_blue">#0000ff</color> + <color name="solid_green">#f0f0</color> + <color name="solid_yellow">#ffff00</color> + <color name="solid_white">#ffffff</color> + + <color name="start_button">#00000000</color> + +</resources> Added: tags/Ver.0.1.5/OpenSangokushi/res/values/strings.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/values/strings.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/values/strings.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="app_name">OpenSangokushi</string> + <string name="opening_message">Please wait....</string> + <string name="start_button">START</string> + <string name="authenticate_button">Authenticate</string> + <string name="not_authenticated">Not Authenticated.</string> + <string name="authenticated">Authenticated.</string> + + <string name="bad_value">Bad value.</string> + + <string name="auth_progress_title">Authenticating...</string> + <string name="auth_progress_text">Fetching your profile information.</string> + + <string name="title_initialization">Initialization</string> + <string name="title_start">START</string> + + <string name="send">send</string> + <string name="chat_edit_hint">message</string> + + <string name="login_settings">Loging Settings</string> + <string name="login_button">Goto Lobby</string> + <string name="twitter_key_edit_hint">Your twitter ID.</string> + <string name="twitter_secret_edit_hint">Your twitter password.</string> + <string name="twitter_id">Twitter ID</string> + <string name="twitter_id_summary">Twitter ID</string> + <string name="twitter_password">Twitter Password</string> + <string name="twitter_password_summary">Entry Twitter password</string> + <string name="twitter_notauth_message">Please permit Twitter clicking here</string> + <string name="tweet_progress_title">Sending...</string> + <string name="tweet_progress_text">Posting your Message</string> + <string name="ok">OK</string> + <string name="cancel">Cancel</string> + <string name="compete">OK</string> + <string name="general">General</string> + <string name="commander">Commander</string> + <string name="game_user">User</string> + + <string name="tweet_error">error</string> + + <string name="menu_reset_userstate">RESET</string> + <string name="menu_reset_userstate_comlplatemessage">Your account information was deleted. </string> + <string name="menu_reset_userstate_notregistered">Your account information is not registered. </string> +</resources> Added: tags/Ver.0.1.5/OpenSangokushi/res/values-ja/colors.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/values-ja/colors.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/values-ja/colors.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="solid_red">#f00</color> + <color name="solid_blue">#0000ff</color> + <color name="solid_green">#f0f0</color> + <color name="solid_yellow">#ffffff00</color> + + <color name="start_button">#000000</color> +</resources> Added: tags/Ver.0.1.5/OpenSangokushi/res/values-ja/strings.xml =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/res/values-ja/strings.xml (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/res/values-ja/strings.xml 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="app_name">Openä¸å½å¿</string> + <string name="opening_message">ãã°ãããå¾ ã¡ä¸ããããã</string> + <string name="start_button">START</string> + <string name="authenticate_button">Twitterèªè¨¼</string> + <string name="not_authenticated">æªèªè¨¼</string> + <string name="authenticated">èªè¨¼æ¸</string> + + <string name="bad_value">ä¸æ£ãªå¤</string> + + <string name="auth_progress_title">èªè¨¼å¦çä¸...</string> + <string name="auth_progress_text">ãããã£ã¼ã«æ å ±ã®åå¾ä¸ã§ãã</string> + + <string name="title_initialization">åæè¨å®</string> + <string name="title_start">éå§</string> + + <string name="send">éä¿¡</string> + <string name="chat_edit_hint">ã¡ãã»ã¼ã¸ãå ¥åãã¦ä¸ãã</string> + + <string name="login_settings">ãã°ã¤ã³è¨å®</string> + <string name="login_button">ããã¼ã¸</string> + <string name="twitter_key_edit_hint">Twitterã®ã¦ã¼ã¶ã¼åãå ¥å</string> + <string name="twitter_secret_edit_hint">Twitterã®ãã¹ã¯ã¼ããå ¥å</string> + <string name="title">Twitterèªè¨¼</string> + <string name="twitter_id">Twitterã®ID</string> + <string name="twitter_id_summary">Twitterã®IDãç»é²ãã¾ã</string> + <string name="twitter_password">Twitterã®ãã¹ã¯ã¼ã</string> + <string name="twitter_password_summary">Twitterã®ãã¹ã¯ã¼ããç»é²ãã¾ã</string> + <string name="twitter_notauth_message">ãããã¯ãªãã¯ãã¦Twitterèªè¨¼ãã¦ä¸ãã</string> + <string name="tweet_progress_title">éä¿¡ä¸...</string> + <string name="tweet_progress_text">ã¡ãã»ã¼ã¸ãéä¿¡ãã¦ãã¾ãã</string> + <string name="ok">è¨å®</string> + <string name="cancel">ãã£ã³ã»ã«</string> + <string name="compete">åæ¦ãã</string> + <string name="general">ç·å¤§å°</string> + <string name="commander">æ¦å°</string> + <string name="game_user">éé·</string> + + <string name="tweet_error">ã¨ã©ã¼ãçºçãã¾ãã</string> + + <string name="menu_reset_userstate">ç»é²è§£é¤</string> + <string name="menu_reset_userstate_comlplatemessage">ããªãã®ã¢ã«ã¦ã³ãæ å ±ãåé¤ãã¾ãã</string> + <string name="menu_reset_userstate_notregistered">ããªãã®ã¢ã«ã¦ã³ãæ å ±ã¯ç»é²ããã¦ãã¾ãã</string> +</resources> Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Battle.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Battle.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Battle.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,663 @@ +package jp.or.cute.sangokushi; + +import java.util.Hashtable; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.util.Currency; +import java.util.LinkedList; +import java.util.Random; + +import oauth.signpost.OAuthConsumer; +import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer; +import oauth.signpost.exception.OAuthCommunicationException; +import oauth.signpost.exception.OAuthExpectationFailedException; +import oauth.signpost.exception.OAuthMessageSignerException; + +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.BasicResponseHandler; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.params.BasicHttpParams; +import org.apache.http.params.HttpParams; +import org.apache.http.params.HttpProtocolParams; +import org.apache.http.protocol.HTTP; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import jp.or.cute.sangokushi.httpclient.BattleResultCommand; +import jp.or.cute.sangokushi.httpclient.HttpClient; +import jp.or.cute.sangokushi.httpclient.HttpCommand; +import jp.or.cute.sangokushi.httpclient.RoomInfoCommand; +import jp.or.cute.sangokushi.model.Player; +import jp.or.cute.sangokushi.twitter.TweetArrayAdapter; +import jp.or.cute.sangokushi.twitter.TweetItem; +import jp.or.cute.sangokushi.twitter.TwitterJSON; +import jp.or.cute.sangokushi.twitter.TwitterOAuth; +import jp.or.cute.sangokushi.twitter.TwitterOperator; +import jp.or.cute.sangokushi.view.ChatView; +import jp.or.cute.sangokushi.view.MapView; +import jp.or.cute.sangokushi.view.WholeMapView; +import android.app.Activity; +import android.app.AlertDialog; +import android.app.ProgressDialog; +import android.content.ContentUris; +import android.content.DialogInterface; +import android.content.Intent; +import android.net.Uri; +import android.os.AsyncTask; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.os.SystemClock; +import android.util.Log; +import android.view.KeyEvent; +import android.view.Menu; +import android.view.MenuItem; +import android.view.inputmethod.InputMethodManager; +import android.webkit.WebView; +import android.widget.EditText; +import android.widget.ListView; +import android.widget.PopupWindow; +import android.widget.TextView; + +/** + * æ¦éç»é¢ç¨ã¢ã¯ãã£ããã£ã¼ + * @author iST + * @version 0.1 + * @since 2010/03/26 + */ +public class Battle extends Activity{ + private WholeMapView mWholeMap; + PopupWindow mPopupWindow; + private MapView map; + ChatView mChatview; + //for Twitter + private TweetArrayAdapter mTweetArrayAdapter; + private LinkedList<TweetItem> mChatTweetLists = new LinkedList<TweetItem>(); + private ListView mTweetList; + private EditText mTweetEditor; + Handler mTweetEditorHandler; + + + private Player mPlayer; + private String mUserID; + public String mUserName; + private String mRoomID; + private String mRoomName; + + private static final int MENU_ID_HELP = (Menu.FIRST + 1); + private boolean visible = true; + + /* + * ã¡ãã¥ã¼ã®è¡¨ç¤º + * by kumazaku 2010/7/31 + */ + @Override + public boolean onCreateOptionsMenu(Menu menu) { + menu.add(Menu.NONE, MENU_ID_HELP, Menu.NONE, "HELP"); + return super.onCreateOptionsMenu(menu); + } + + @Override + public boolean onPrepareOptionsMenu(Menu menu) { + menu.findItem(MENU_ID_HELP).setVisible(visible); + visible = !visible; + return super.onPrepareOptionsMenu(menu); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + boolean ret = true; + switch (item.getItemId()) { + default: + ret = super.onOptionsItemSelected(item); + break; + case MENU_ID_HELP: + Log.d("BattleMenu","HELP"); + Uri uri = Uri.parse("http://sangokushi.cute.or.jp/index.php/help/battle-operation"); + Intent intent = new Intent(Intent.ACTION_VIEW, uri); + startActivity(intent); + + ret = true; + break; + } + return ret; + } + + + + + /* + * 詳細ãããããå ¨ä½ãããã¸ã®ãã³ãã©ã¼ + */ + private Handler mWholeMapHandler = new Handler(){ + public void handleMessage(Message msg){ + try{ + int[] xy = (int[]) msg.obj; + mWholeMap.drawArea(xy[0],xy[1]); + }catch (Exception e) { + e.printStackTrace(); + } + } + }; + /* + * ä»®ã«ãã¬ã¤ã¤ã¼ãçæãã¦ãã + */ + private Player[] makePlayers() { + Random rnd = new Random(); + rnd.setSeed(11); + Player[] players = new Player[10]; + for (int i=0;i<players.length;i++) { + int x = rnd.nextInt(45) % 45; + int country = (x % 2); + int y = rnd.nextInt(45) % 45; + //Log.d("makePlayers","i="+Integer.toString(i)+"|x="+Integer.toString(x)+"|y="+Integer.toString(y)); + players[i] = new Player(this,Integer.toString(i+1)+" Force"); + players[i].setPoint(x, y); + players[i].setCountry(country); + } + return players; + } + + private Player[] makePlayers(String msg) { + String[] pInfo = msg.split(">>"); + //Log.d("makePlayers","size="+Integer.toString(pInfo.length)); + Player[] players = new Player[pInfo.length-1]; + //Log.d("makePlayers","players size="+Integer.toString(players.length)); + for (int i=1,j=0;i<pInfo.length;i++,j++) { + int top = 0; + String[] pValue = pInfo[i].split(","); + //Log.d("makePlayers","["+pValue[0]+"]["+pValue[1]+"]["+pValue[2]+"]["+pValue[3]+"]["+pValue[4]+"]"); + //Log.d("makePlayers","Call setInfo i="+Integer.toString(i)+"|j="+Integer.toString(j)); + players[j] = new Player(this,pValue[top+1]); + int cell = Integer.parseInt(pValue[top+3]); + int power = Integer.parseInt(pValue[top+4]); + players[j].setInfo(power, 0, pValue[top+0], Integer.parseInt(pValue[top+2])-1, cell); + if (pValue[top+1].equals(mUserName)) { + mPlayer = players[j]; + } + } + return players; + } + + + public void onParam() + { + + } + + public Player[] getPlayerInfo() + { + SangokushiPreferences pref = new SangokushiPreferences(this); + BattleResultCommand command = new BattleResultCommand(HttpCommand.POST, pref.getSessionID(),mRoomID); + HttpClient httpclient = HttpClient.getInstance(); + httpclient.setHttpCommand(command); + String playerInfo = (String) httpclient.execute(); + Log.d("Battle","playerInfo="+playerInfo); +// String playerInfo = map.getLobbyPlayers(); + Player[] players = makePlayers(playerInfo); + return players; + } + /** + * æ¦éç»é¢ç¨onCreate + * @author narunaru + * @version 0.2 + * @since 2010/10/05 + */ + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.battle); + SangokushiPreferences pref = new SangokushiPreferences(this); + + mChatview = (ChatView) findViewById(R.id.ChatView); + //userid,roomid + Intent intent = getIntent(); + String msg = (String)intent.getSerializableExtra("String"); + Log.d("Battle","Intent msg=\"" + msg + "\""); + String[] msgArr = msg.split(","); + mUserID = msgArr[0]; + mRoomID = msgArr[1]; + mRoomName = msgArr[2]; + mUserName = msgArr[3]; + TextView mRoomNameView = (TextView) findViewById(R.id.TextView02); + mRoomNameView.setText(mRoomName); + + // roomã®ã¿ã¼ã³æ å ±ãåå¾ + RoomInfoCommand command = new RoomInfoCommand(HttpCommand.POST, pref.getSessionID(), mRoomID); + HttpClient httpclient = HttpClient.getInstance(); + httpclient.setHttpCommand(command); + + String result = (String) httpclient.execute(); + Log.d("getRoomInfo","rsult="+result); + String[] param = result.split(">>"); + String[] value = param[1].split(","); + int maxTurn = Integer.valueOf(value[0]); + int currentTurn = Integer.valueOf(value[1]); + int diffTurn = maxTurn - currentTurn; + TextView currentTurnView = (TextView) findViewById(R.id.TextView03); + currentTurnView.setText(Integer.toString(currentTurn)+"æ¥ç®"); + TextView diffTurnView = (TextView) findViewById(R.id.TextView01); + diffTurnView.setText("æ®ã"+Integer.toString(diffTurn)+"æ¥"); + + mUserName = pref.getUserName(); + // = new Player(this,mUserName); + + map = (MapView) findViewById(R.id.MapView); + map.mUserName = mUserName; + Player[] players = getPlayerInfo(); + int[] CountryPower = new int[3]; + int[] unit = new int[3]; + String[] general = new String[3]; + mPlayer.setMySelf(); + + String countryName = pref.getCountryID(); + if (0 >= countryName.length()) { + // ããã¼ã®å¤ãè¨å®(todo:æ£ããã¯ã¨ã©ã¼å¦çãã¹ã) + countryName = "1"; + } + // playeråå é¨ã§ã¯CountryIdã¯0ããå§ã¾ã£ã¦ããããã-1ããã + int myCountryId = Integer.parseInt(countryName) - 1; + int enemyCountryId = -1; + for (int i=0;i<players.length;i++) { + int c = players[i].getCountryID(); + if (myCountryId != c) { + enemyCountryId = c; + } + CountryPower[c] += players[i].getPower(); + unit[c]++; + if (players[i].getCommanderClass() == Player.GENERAL) { + general[c] = players[i].getName(); + } + if (players[i].getName().equals(mUserName)) { + players[i].setMySelf(); +// player = players[i]; + } + } + Log.d("Battle","Power=["+Integer.toString(CountryPower[0])+"]["+Integer.toString(CountryPower[1])+"]["+Integer.toString(CountryPower[2])+"]"); + Log.d("Battle","Unit=["+Integer.toString(unit[0])+"]["+Integer.toString(unit[1])+"]["+Integer.toString(unit[2])+"]"); + + int power1 = CountryPower[myCountryId]; + int power2 = CountryPower[enemyCountryId]; + int unit1 = unit[myCountryId]; + int unit2 = unit[enemyCountryId]; + + String country1 = Player.getCountryName(myCountryId); + String country2 = Player.getCountryName(enemyCountryId); + String power1String = Integer.toString(power1); + String power2String = Integer.toString(power2); + String unit1String = Integer.toString(unit1); + String unit2String = Integer.toString(unit2); + + String statusMsg = country1+"è» ç·å µå "+power1String+"å\nãã ç·ã¦ãããæ° "+unit1String+"ã¦ããã\n"+country2+"è» ç·å µå "+power2String+"å\nãã ç·ã¦ãããæ° "+unit2String+"ã¦ããã"; + TextView statusView = (TextView) findViewById(R.id.StatusView); + statusView.setText(statusMsg); + + mWholeMap = (WholeMapView) findViewById(R.id.WholeMap); + map.setWholeMapView(mWholeMap); + mWholeMap.setPlayer(mPlayer); + mWholeMap.setPlayers(players); + map.setWholeMapViewHandler(mWholeMapHandler); + map.setPlayer(mPlayer); + map.setPlayers(players); + map.setUserAndRoom(mUserID,mRoomID); + map.setContent(this); + + mChatview.init(this, mRoomID, mPlayer.getCountryName()); + +// initPopUp(); + mTweetList = mChatview.getTweetList(); + mTweetEditor = mChatview.getTweetEditor(); + //mTweetList = (ListView) mChatview.findViewById(R.id.TweetListView); +// mChatTweetLists.add(new TweetItem("AB1")); +// mChatTweetLists.add(new TweetItem("AB2")); +// mChatTweetLists.add(new TweetItem("AB3")); +// mChatTweetLists.add(new TweetItem("AB4")); + + mTweetArrayAdapter = new TweetArrayAdapter(this, R.layout.tweetlist, mChatTweetLists); + mTweetList.setAdapter(mTweetArrayAdapter); + //mTweetList.setSelection(0); + } + + @Override + protected void onDestroy() { + // TODO Auto-generated method stub + Log.d("Battle","onDestory()"); + super.onDestroy(); + } + + @Override + protected void onPause() { + // TODO Auto-generated method stub + Log.d("Battle","onPause()"); + super.onPause(); + } + + @Override + protected void onStop() { + // TODO Auto-generated method stub + Log.d("Battle","onStop()"); + super.onResume(); + } + + @Override + protected void onResume() { + // TODO Auto-generated method stub + Log.d("Battle","onResume()"); + super.onResume(); + } + + public Handler getTwitterAuthenticateHandler(){ + return mAuthenticateHandler; + } + /* + * èªè¨¼å¦çã®ãã³ãã© + * TwitterCredentialRunnableããsendããã + */ + private Handler mAuthenticateHandler = new Handler(){ + public void handleMessage(Message msg){ + JSONObject json = (JSONObject) msg.obj; + if(json != null){ + //èªè¨¼OK + + }else{ + //èªè¨¼ãã¨ãããªããã°Twitterèªè¨¼ç»é¢ã¸é·ç§» + //startOAuth(); + startTwitterAuth(); + } + } + }; + private void startTwitterAuth(){ + try{ + Intent intent = new Intent(this, TwitterOAuth.class); + //intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); + startActivityForResult(intent, Opening.RESULT_OAUTH); + }catch(Exception e){ + e.printStackTrace(); + } + } + + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + if(requestCode == Opening.RESULT_OAUTH){ + //èªè¨¼ç¨Activityï¼TwitterOAuthï¼ããã®æ»ã + if(resultCode == RESULT_OK){ + //èªè¨¼OK + mChatview.loadTweets(mChatview.getChatTag()); + }else{ + //èªè¨¼NG + } + } + } + + + @Override + public void onWindowFocusChanged(boolean hasFocus) { + super.onWindowFocusChanged(hasFocus); + + if(getCurrentFocus().equals(mTweetEditor)){ + mTweetEditorHandler = new Handler(); + Message m = Message.obtain(mTweetEditorHandler, new Runnable() { + @Override + public void run() { + InputMethodManager manager = (InputMethodManager)getSystemService(Activity.INPUT_METHOD_SERVICE); + manager.showSoftInput(mTweetEditor, InputMethodManager.SHOW_IMPLICIT); + } + }); + mTweetEditorHandler.sendMessage(m); + } + } + /*============================================ + * Twitter + * =========================================== */ + private String mHashTag; + public String getHashTag(){ + return mHashTag; + } + /* + * Tweetåå¾ + */ + public void loadTweets(String hashtag){ + mHashTag = hashtag; + HashTagSelector hs = new HashTagSelector(TwitterOperator.SEARCH_TIMELINE_URL_STRING, hashtag); + new GetHashTagTimelineTask().execute(hs); + } + /* + * Tweetéä¿¡ + */ + public void sendTweet(String hashtag){ + mHashTag = hashtag; + String postString = mTweetEditor.getText().toString(); + postString = "[" + mUserName + "] " + postString + " " + hashtag; + new PostTask().execute(postString); + } + + private class HashTagSelector extends Object { + public String url; + public Long since_id; + public Long max_id; + public Integer count; + public Integer page; + public Integer rpp = 10; + public String q; + + public HashTagSelector(String u, String tag) { + url = u; + max_id = null; + since_id = null; + count = null; + page = null; + if(tag == null){ + q = TwitterOperator.DEFAULT_HASHTAG; + }else{ + q = tag; + } + } + + @SuppressWarnings("unused") + public HashTagSelector(String u, Long since, Long max, Integer cnt, Integer pg, String tag) { + url = u; + max_id = max; + since_id = since; + count = cnt; + page = pg; + if(tag == null){ + q = TwitterOperator.DEFAULT_HASHTAG; + }else{ + q = tag; + } + } + } + /* + * ç¹å®ã®ããã·ã¥ã¿ã°ããã¤çºè¨ãåå¾ + */ + private class GetHashTagTimelineTask extends AsyncTask<HashTagSelector, Void, JSONArray> { + + DefaultHttpClient mClient; + //OAuth + private OAuthConsumer mConsumer; + + @Override + protected void onPreExecute() { + mClient = new DefaultHttpClient(); + //OAuthã³ã³ã·ã¥ã¼ãã¼ + mConsumer = new CommonsHttpOAuthConsumer( + TwitterOperator.TWITTER_CONSUMER_KEY, + TwitterOperator.TWITTER_CONSUMER_SECRET); + + } + + @Override + protected JSONArray doInBackground(HashTagSelector... params) { + JSONArray array = null; + try { + for(int i = 0; i < params.length; ++i) { + Uri sUri = Uri.parse(params[i].url); + Uri.Builder builder = sUri.buildUpon(); + if(params[i].since_id != null) { + builder.appendQueryParameter("since_id", String.valueOf(params[i].since_id)); + } else if (params[i].max_id != null) { // these are mutually exclusive + builder.appendQueryParameter("max_id", String.valueOf(params[i].max_id)); + } + if(params[i].count != null) { + builder.appendQueryParameter("count", String.valueOf((params[i].count > 200) ? 200 : params[i].count)); + } + if(params[i].rpp != null) { + builder.appendQueryParameter("rpp", String.valueOf(params[i].rpp)); + } + if(params[i].page != null) { + builder.appendQueryParameter("page", String.valueOf(params[i].page)); + } + if(params[i].q != null) { + builder.appendQueryParameter("q", String.valueOf(params[i].q)); + } + HttpGet get = new HttpGet(builder.build().toString()); + mConsumer.sign(get); + String response = mClient.execute(get, new BasicResponseHandler()); + if(!response.startsWith("[")){ + response = "[" + response + "]"; + } + array = new JSONArray(response); + } + } catch (JSONException e) { + e.printStackTrace(); + } catch (OAuthMessageSignerException e) { + e.printStackTrace(); + } catch (OAuthExpectationFailedException e) { + e.printStackTrace(); + } catch (ClientProtocolException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } catch (OAuthCommunicationException e) { + e.printStackTrace(); + } + return array; + } + + // This is in the UI thread, so we can mess with the UI + protected void onPostExecute(JSONArray array) { + mClient.getConnectionManager().shutdown(); + JSONArray realArray = null; + if(array != null) { + try { + if(array.length() == 1){ + JSONObject checkStatus = array.getJSONObject(0); + if(checkStatus.has("query") && checkStatus.has("results")){ + //æ¤ç´¢çµæ + realArray = checkStatus.getJSONArray("results"); + } + }else{ + realArray = array; + } + mChatTweetLists.clear(); + for(int i = 0; i < realArray.length(); ++i) { + JSONObject status = realArray.getJSONObject(i); + TwitterJSON json = new TwitterJSON(Battle.this); + TweetItem item = new TweetItem(Battle.this, json, status); + mChatTweetLists.add(item); + } + mTweetArrayAdapter.notifyDataSetChanged(); + } catch (JSONException e) { + e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + } + } else { + } + } + } + + /* + * Tweetã®éä¿¡ + */ + private class PostTask extends AsyncTask<String, Void, JSONObject> { + + ProgressDialog postDialog; + DefaultHttpClient mClient; + //OAuth + private OAuthConsumer mConsumer; + + @Override + protected void onPreExecute() { + if(Battle.this.isFinishing()){ + this.cancel(true); + return; + } + SangokushiPreferences pref = new SangokushiPreferences(Battle.this); + + mClient = new DefaultHttpClient(); + //OAuthã³ã³ã·ã¥ã¼ãã¼ + mConsumer = new CommonsHttpOAuthConsumer( + TwitterOperator.TWITTER_CONSUMER_KEY, + TwitterOperator.TWITTER_CONSUMER_SECRET); + TwitterOperator operator = new TwitterOperator(Battle.this); + mConsumer.setTokenWithSecret(operator.getTwitterToken(), operator.getTwitterSecret()); + postDialog = ProgressDialog.show(Battle.this, + getText(R.string.tweet_progress_title), + getText(R.string.tweet_progress_text), + true, + false); + } + + @Override + protected JSONObject doInBackground(String... params) { + + JSONObject jso = null; + try { + HttpPost post = new HttpPost(TwitterOperator.TWITTER_UPDATE_URL); + LinkedList<BasicNameValuePair> out = new LinkedList<BasicNameValuePair>(); + out.add(new BasicNameValuePair("status", params[0])); + post.setEntity(new UrlEncodedFormEntity(out, HTTP.UTF_8)); + post.setParams(getParams()); + // sign the request to authenticate + mConsumer.sign(post); + String response = mClient.execute(post, new BasicResponseHandler()); + jso = new JSONObject(response); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } catch (OAuthMessageSignerException e) { + e.printStackTrace(); + } catch (OAuthExpectationFailedException e) { + e.printStackTrace(); + } catch (OAuthCommunicationException e) { + e.printStackTrace(); + } catch (ClientProtocolException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } catch (JSONException e) { + e.printStackTrace(); + } finally { + + } + return jso; + } + + // This is in the UI thread, so we can mess with the UI + protected void onPostExecute(JSONObject jso) { + mClient.getConnectionManager().shutdown(); + postDialog.dismiss(); + if(jso != null) { // authorization succeeded, the json object contains the user information + mTweetEditor.setText(""); + //mLast.setText(json.getCurrentTweet(jso)); + loadTweets(mHashTag); + } else { + //mLast.setText(getText(R.string.tweet_error)); + } + } + } + public HttpParams getParams() { + HttpParams params = new BasicHttpParams(); + HttpProtocolParams.setUseExpectContinue(params, false); + return params; + } + + +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Initialization.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Initialization.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Initialization.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,210 @@ +package jp.or.cute.sangokushi; + +import jp.or.cute.sangokushi.httpclient.HttpClient; +import jp.or.cute.sangokushi.httpclient.HttpCommand; +import jp.or.cute.sangokushi.httpclient.HttpRunnable; +import jp.or.cute.sangokushi.httpclient.InitializeCommand; +import jp.or.cute.sangokushi.httpclient.LoginCommand; +import jp.or.cute.sangokushi.httpclient.ResponceHandler; +import android.app.Activity; +import android.app.AlertDialog; +import android.content.Intent; +import android.location.Location; +import android.location.LocationListener; +import android.location.LocationManager; +import android.os.Bundle; +import android.os.Message; +import android.view.View; +import android.widget.EditText; +import android.widget.ImageButton; +import android.widget.Toast; + +/** + * åæè¨å®ç»é¢ç¨ã¢ã¯ãã£ããã£ã¼ + * + * @author non + * @author iST + * @version 0.1 + * @since 2010/05/01 + */ + +public class Initialization extends Activity implements View.OnClickListener, LocationListener { + + private ImageButton mPresetButton; + private ImageButton mLoginButton; + private EditText mUserNameTextBox; + private LocationManager mLocationManager; + private double mLatitude; + private double mLongitude; + + private ResponceHandler mPresetHandler = new ResponceHandler(){ + public void handleMessage(Message msg){ + super.handleMessage(msg); + if(this.isError()){ + String message = "ç»é²æã«ã¨ã©ã¼ãçºçãã¾ããã"; + //if(this.getErrorCode() == ResponceHandler.ERROR_CODE_INIT_DUPLICATION_USERNAME){ + if(this.getErrorCode().equals(ResponceHandler.ERROR_CODE_INIT_DUPLICATION_USERNAME)){ + message = "ã¦ã¼ã¶ã¼åã¯æ¢ã«å©ç¨ããã¦ãã¾ããå¥ãªã¦ã¼ã¶ã¼åãæå®ãã¦ä¸ãã"; + } + Toast.makeText(Initialization.this, message, Toast.LENGTH_LONG).show(); + return; + } + String[] responces = ResponceHandler.splitResponceParts(this.getResponceArray()[1]); + String[] responces2_for_sessionID = ResponceHandler.splitResponceParts(this.getResponceArray()[0]); + if(responces.length == 3){ + /** + * SessionIDéç¨ã«ä¼´ããã°ã¤ã³NGä¿®æ£ + * akifumi3 2010.05.12 + */ + //Ud474bcd73,0fdcfbd07a893ffec59ff2c2790b7a7f,1,é + //[U7ee62fc81, 3, è] + SangokushiPreferences pref = new SangokushiPreferences(Initialization.this); + //SessionIDä¿å + //pref.setSessionID(responces[1]); + pref.setSessionID(responces2_for_sessionID[2]); + + + //ã¦ã¼ã¶ã¼IDãã¦ã¼ã¶ã¼å + pref.setUserID(responces[0]); + pref.setUserName(mUserNameTextBox.getText().toString()); + + //æå±å½IDãè¨å® + //pref.setCountryID(responces[2]); + pref.setCountryID(responces[1]); + + String message = "ç»é²ãã¾ããããåå ããããã¿ãããã¦ä¸ããã"; + Toast.makeText(Initialization.this, message, Toast.LENGTH_LONG).show(); + } + } + }; + + private ResponceHandler mLoginHandler = new ResponceHandler(){ + public void handleMessage(Message msg){ + super.handleMessage(msg); + if(this.isError()){ + String message = "ãã°ã¤ã³æã«ã¨ã©ã¼ãçºçãã¾ããã"; + Toast.makeText(Initialization.this, message, Toast.LENGTH_LONG).show(); + return; + } + //ããã¼ç»é¢ + try{ + Intent intent = new Intent(Initialization.this, Lobby.class); + //intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); + startActivityForResult(intent, SangokushiPreferences.RESULT_LOBBY); + }catch(Exception e){ + e.printStackTrace(); + } + } + }; + + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.initialization); + + mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE); + + } + @Override + protected void onDestroy() { + if (mLocationManager != null) { + mLocationManager.removeUpdates(this); + } + super.onDestroy(); + } + + @Override + protected void onPause() { + if (mLocationManager != null) { + mLocationManager.removeUpdates(this); + } + super.onPause(); + } + + @Override + protected void onResume() { + mPresetButton = (ImageButton) findViewById(R.id.presetBtn); + mPresetButton.setOnClickListener(this); + mLoginButton = (ImageButton) findViewById(R.id.loginBtn); + mLoginButton.setOnClickListener(this); + mUserNameTextBox = (EditText) findViewById(R.id.edittext_name); + + if (mLocationManager != null) { + mLocationManager.requestLocationUpdates( + LocationManager.GPS_PROVIDER, + 0, + 0, + this); + } + + super.onResume(); + } + + @Override + public void onClick(View v) { + SangokushiPreferences pref; + if(v.equals(this.mPresetButton)){ + //ã¦ã¼ã¶ã¼åç»é²ãæå±å½æ±ºå® + //ã¦ã¼ã¶ã¼åãã§ã㯠+ if(mUserNameTextBox.getText() == null){ + AlertDialog.Builder alertDialog = new AlertDialog.Builder(Initialization.this); + alertDialog.setTitle("ã¨ã©ã¼"); + alertDialog.setMessage("ã¦ã¼ã¶ã¼åãå ¥åãã¦ä¸ãã"); + alertDialog.show(); + return; + } + //ã¦ã¼ã¶ã¼åãGPSæ å ±éä¿¡ + pref = new SangokushiPreferences(Initialization.this); + InitializeCommand command = new InitializeCommand(HttpCommand.POST, pref.getSessionID()); + command.setParam("un", mUserNameTextBox.getText().toString()); + command.setParam("lat", String.valueOf(mLatitude)); + command.setParam("lon", String.valueOf(mLongitude)); + HttpClient httpclient = HttpClient.getInstance(); + httpclient.setHttpCommand(command); + HttpRunnable runnable = new HttpRunnable(mPresetHandler, httpclient); + new Thread(runnable).start(); + + + }else if(v.equals(this.mLoginButton)){ + //ç»é² + //ã¦ã¼ã¶ã¼IDãç¡ãå ´åã¯ã¡ãã»ã¼ã¸ + pref = new SangokushiPreferences(Initialization.this); + if(pref.getUserID() == null){ + String message = "ã¦ã¼ã¶ã¼åãç»é²ãã¦ä¸ããã"; + Toast.makeText(Initialization.this, message, Toast.LENGTH_LONG).show(); + return; + } + //ãã°ã¤ã³å¦ç½® + LoginCommand command = new LoginCommand(HttpCommand.POST, pref.getSessionID()); + command.setParam("userid", pref.getUserID()); + HttpClient httpclient = HttpClient.getInstance(); + httpclient.setHttpCommand(command); + HttpRunnable runnable = new HttpRunnable(mLoginHandler, httpclient); + new Thread(runnable).start(); + } + } + @Override + public void onLocationChanged(Location location) { + mLatitude = location.getLatitude(); + mLongitude = location.getLongitude(); + } + @Override + public void onProviderDisabled(String provider) { + mLatitude = 0d; + mLongitude = 0d; + } + @Override + public void onProviderEnabled(String provider) { + // TODO Auto-generated method stub + + } + @Override + public void onStatusChanged(String provider, int status, Bundle extras) { + // TODO Auto-generated method stub + + } + + + +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Lobby.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Lobby.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Lobby.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,492 @@ +package jp.or.cute.sangokushi; + +/** + * ããã¼ç»é¢ + * @author akifumi3 + * @author takki + * @version 0.1.2 + * @since 2010/04/28 + * @change 2010/05/02 + * @change 2010/05/11 + * ãªã¼ããã³ã°ç»é¢ãå¼ã³åºããã + * ããã¼ãé¸æããã¨æ¦éç»é¢ã«ç§»è¡ãã + */ + +import jp.or.cute.sangokushi.httpclient.EnteringLobbyCommand; +import jp.or.cute.sangokushi.httpclient.BattleResultCommand; +import jp.or.cute.sangokushi.httpclient.HttpClient; +import jp.or.cute.sangokushi.httpclient.HttpCommand; +import jp.or.cute.sangokushi.httpclient.LeavingLobbyCommand; +import jp.or.cute.sangokushi.httpclient.LobbyInfoCommand; +import jp.or.cute.sangokushi.httpclient.UserStatusCommand; + +import android.app.Activity; +import android.location.LocationManager; +import android.os.Bundle; +import android.os.Message; +import android.widget.ArrayAdapter; +import android.widget.EditText; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.TextView; +import android.widget.Toast; +import android.widget.AdapterView.OnItemClickListener; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.util.Log; +import android.view.View; +import android.widget.*; + +public class Lobby extends Activity { + public static final int RESULT_OAUTH = 1001; + private Activity me; + private String user_id; + private String room_id; + private String room_name; + private String[] battleStatusList; + private SangokushiPreferences mPref; + + private TextView userName; + private TextView userWin; + private TextView userLose; + private ImageView map; + + public battle_Status[] makeBattleStatus(String result) { + int max_data = 5; // param.length-1; + battleStatusList = new String[max_data]; + battle_Status[] bs = new battle_Status[max_data]; + if(result == null){ + return bs; + } + String[] param = result.split(">>"); + + for(int j=1,i=0;j<6;j++,i++){ + String[] value = param[j].split(","); + bs[i] = new battle_Status(); + bs[i].setlocation(value[1]); + bs[i].setRoomid(Integer.parseInt(value[0])); + if (value[2] == "0") { + bs[i].setOngoing(false); + } else if (value[2] == "2"){ + bs[i].setOngoing(true); + } else { + bs[i].setOngoing(false); + } + String location = value[1] + "ä¹æ¦"; + bs[i].setlocation(location); + + /* + * RoomIDæ¯ã®æ¦æ³ãåå¾ãæ ¼ç´ + */ + String[] temp = getBattle(value[0],value[3],value[4]).split(","); + bs[i].setGeneralAndPeople(temp[0],Integer.parseInt(temp[1]),Integer.parseInt(temp[2]),temp[3],Integer.parseInt(temp[4]),Integer.parseInt(temp[5])); + + //対æ¦å½ é VS è ãªã©ã®æ å ±ãæ ¼ç´ + bs[i].setAttackCountry(value[3]); + bs[i].setDefenceCountry(value[4]); + + //çµéæ¥æ° + bs[i].setPastDay(value[7]); + + } + + return bs; + } + + public String getBattle(String roomid,String attack,String defence){ + /* + * å¼æ°ããæ»æå½/å®åå½ãå¤æãã¾ã + * å¼æ°ï¼room_id ,æ»æå½ID(1-3), å®åå½ID(1-3) + */ + int attackPeoples = 0; //æ»æå´åå 人æ°(ã¦ã¼ã¶ã¼æ°) + int attackSoldiers = 0; //æ»æå´ç·å µå + int defencePeoples = 0; //é²å¾¡å´åå 人æ°(ã¦ã¼ã¶ã¼æ°) + int defenceSoldiers = 0;//æ»æå´ç·å µå + + String attackGeneral = ""; + String defenceGeneral = ""; + + BattleResultCommand brc = new BattleResultCommand(HttpCommand.POST,mPref.getSessionID()); + brc.setParam("roomid",roomid); + HttpClient brc_httpClient = HttpClient.getInstance(); + brc_httpClient.setHttpCommand(brc); + String res = (String) brc_httpClient.execute(); + String[] result_temp = res.split(">>"); + + for(int i=1;i<result_temp.length;i++){ + String[] temp = result_temp[i].split(","); + //B,AI 2 æ»æ,2,29,10>> + //B,AI 1 å®å,1,3571,9>> + if(attack.equals(temp[2])){ + //æ»æå½ + attackSoldiers += Integer.parseInt(temp[4]); + attackPeoples++; + + if(temp[0].equals("s")){ + attackGeneral = temp[1]; + } + }else if(defence.equals(temp[2])){ + //å®åå½ + defenceSoldiers += Integer.parseInt(temp[4]); + defencePeoples++; + if(temp[0].equals("s")){ + defenceGeneral = temp[1]; + } + } + } + // '"æ»æå½ ç·å¤§å°", "æ»æå½ åå 人æ°","æ»æå½ å µå","å®åå½ ç·å¤§å°","å®åå½ åå 人æ°","å®åå½ å µå"'ã®å½¢å¼ã§æ»ã + return attackGeneral + "," + String.valueOf(attackPeoples) + "," + String.valueOf(attackSoldiers) +","+ defenceGeneral +","+String.valueOf(defencePeoples)+"," + String.valueOf(defenceSoldiers); + + } + + @Override + protected void onResume() { + + userName = (TextView)findViewById(R.id.TextView01); + userWin = (TextView)findViewById(R.id.TextView04); + userLose = (TextView)findViewById(R.id.TextView06); + map = (ImageView) findViewById(R.id.map); + final ListView list1 = (ListView) findViewById(R.id.ListView01); + me = this; + + /* + * ããã¼æ å ±åå¾ã»ä½æ + */ + //éä¿¡ã³ãã³ãã«sessionIDã追å by iST + mPref = new SangokushiPreferences(this); + LobbyInfoCommand command = new LobbyInfoCommand(HttpCommand.POST, mPref.getSessionID()); + HttpClient httpclient = HttpClient.getInstance(); + httpclient.setHttpCommand(command); + String result = (String) httpclient.execute(); + Log.d("Lobby","result="+result); + battle_Status[] bs = makeBattleStatus(result); + + for(int i =0;i<bs.length;i++){ + if(bs[i] == null){ + continue; + } + battleStatusList[i] = bs[i].getlocation(); + //if(bs[i].isOngoing()){ + if(bs[i].pastDay > 0){ + battleStatusList[i] += " "+ bs[i].getPastDay()+"æ¥çµé"; + }else{ + battleStatusList[i] += " éæ¦å"; + } + } + + /* + * æ¦ãªã¹ãä½æå¦ç(ListView) + */ + ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.list, battleStatusList); + list1.setAdapter(adapter); + list1.setSelection(0); + list1.setOnItemClickListener(new MyClickAdapter(bs,bs.length)); + + /* + * UserStatus(ç»é¢ä¸å´)ä½æå¦ç + */ + //Preferenceããã¦ã¼ã¶åãåå¾ãè¨å® + userName.setText(mPref.getUserName()); + + //æ¦æ³(å人æ績)ããµã¼ãã¼åãåãã + UserStatusCommand mUserStatusCommand = new UserStatusCommand(HttpCommand.POST, mPref.getSessionID()); + mUserStatusCommand.setParam("userid",mPref.getUserID()); + HttpClient ust_httpClient = HttpClient.getInstance(); + ust_httpClient.setHttpCommand(mUserStatusCommand); + String ust_result = (String) ust_httpClient.execute(); + makeUserStatus(ust_result); + + //ä¸å¤®ã®æå±å½ç»åãåå¾ã»è¡¨ç¤º + Resources r = getResources(); + Bitmap bmp_map; + bmp_map = BitmapFactory.decodeResource(r, R.drawable.gi_bg); + + switch(Integer.parseInt(mPref.getCountryID())){ + case 1: + break; + case 2: + bmp_map = BitmapFactory.decodeResource(r, R.drawable.go_bg); + break; + case 3: + bmp_map = BitmapFactory.decodeResource(r, R.drawable.syoku_bg); + break; + default: + break; + + } + map.setImageBitmap(bmp_map); + + + super.onResume(); + } + + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.lobby); + + } + + private void makeUserStatus(String result){ + String[] ust = result.split(">>"); + String[] win_lose = ust[1].split(","); + + if(win_lose.length == 2){ + //ERRORãããªãã£ãå ´å + userWin.setText(win_lose[0]+"å"); + userLose.setText(win_lose[1]+"å"); + }else{ + //lengthã2以å¤ã®å ´åã¯ã¨ã©ã¼ã³ã¼ãã¨å¤æ + String error_text = "æ¦æ´ã®åå¾ã«å¤±æãã¾ãã\n(error:U01005 >>"+ust[1]+")"; + userWin.setText("åå¾NG"); + userLose.setText("åå¾NG"); + + Log.d("Lobby","U01005 result is "+ust[1]); + + //失æã¡ãã»ã¼ã¸ãToast表示 + Toast.makeText(this, error_text, Toast.LENGTH_LONG).show(); + } + } + + + // ã¤ãã³ãã¯ã©ã¹ + class MyClickAdapter implements OnItemClickListener { + //fix magic number. akifumi3 + //battle_Status[] bs_copy = new battle_Status[5];//TODO also magic number too. + battle_Status[] bs_copy; + + public MyClickAdapter(battle_Status _bs[],int num){ + //Magic numberä¿®æ£ã«ããå¼æ°å¤æ´ã¨é ååæåãããã¸ç§»å + bs_copy = new battle_Status[num]; + bs_copy = _bs; + } + + /* + * Battleé·ç§» @Takki + */ + private void startBattle(){ + try{ + Log.d("Debug","Intent call"); + //SharedPreferencesããuserIDãåå¾ by iST + user_id = mPref.getUserID(); + + leaveRoom(); + if(enterRoom()) { + Intent intent = new Intent(me, Battle.class); + String msg = user_id + "," + room_id +"," + room_name+","+mPref.getUserName(); + intent.putExtra("String", msg); + startActivityForResult(intent, RESULT_OAUTH); + } + }catch(Exception e){ + e.printStackTrace(); + } + } + + /* + * é室å¦ç @masa + */ + private void leaveRoom(){ + LeavingLobbyCommand command = new LeavingLobbyCommand(HttpCommand.POST, room_id, user_id, mPref.getSessionID()); + + Log.d("Debug", "leave_room"); + Log.d("room_id", room_id); + Log.d("user_id", user_id); + Log.d("s_id", mPref.getSessionID()); + + HttpClient httpclient = HttpClient.getInstance(); + httpclient.setHttpCommand(command); + String result = (String)httpclient.execute(); + Log.d("leave_room_result", result); + } + + + /* + * å ¥å®¤å¦ç @masa + */ + private boolean enterRoom(){ + EnteringLobbyCommand command = new EnteringLobbyCommand(HttpCommand.POST, room_id, user_id, mPref.getSessionID()); + + Log.d("Debug", "leave_room"); + Log.d("room_id", room_id); + Log.d("user_id", user_id); + Log.d("s_id", mPref.getSessionID()); + + HttpClient httpclient = HttpClient.getInstance(); + httpclient.setHttpCommand(command); + String result = (String) httpclient.execute(); + Log.d("enter_room_result", result); + String[] resArray = result.split(">>"); + + String[] dataArray1 = resArray[0].split(","); + +/* + String[] dataArray2 = resArray[1].split(","); + for(int i = 0; i < dataArray2.length; i++) { + Log.d("enter_room_res2", i + "=" + dataArray2[i]); + } +*/ + + if(dataArray1[1].equals("0")) { + return true; + } else { + Log.d("enter_room_res", dataArray1[1]); + Toast.makeText(me, "åæ¦ã«å¤±æãã¾ããã", Toast.LENGTH_LONG).show(); + return false; + } + } + + @Override + public void onItemClick(AdapterView<?> adapter, + View view, int position, long id) { + AlertDialog.Builder bldr = new AlertDialog.Builder(me); + + bldr.setTitle("æ¦æ³");//TODO values/string/hoge ã«ç´ã + + String dialog_message = bs_copy[position].getAll_jp(); + bldr.setMessage(dialog_message); + room_id = Integer.toString(bs_copy[position].getRoomid()); + room_name= bs_copy[position].getRoomName(); + + DialogInterface.OnClickListener listner = new DialogInterface.OnClickListener(){ + @Override + public void onClick(DialogInterface dialog, int which) { + Log.d("Button",Integer.toString(which)); + setResult(RESULT_OK); + } + }; + //TODO String.xmlãåç §ããäºå® + bldr.setPositiveButton("åæ¦ãã",new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + Log.d("Button push","compete"); + startBattle(); + } + }); + bldr.setNegativeButton(getString(R.string.cancel), listner); + bldr.create(); + bldr.show(); + } + + + } + + public class battle_Status { + private int roomid; + private String location; //赤å£ä¹æ¦ ãªã© + private boolean ongoing; //true = 対å³ä¸, false = éæ¦å + private int pastDay = 0; //çµéæ¥æ° + //æ¥æ°ã§ã¿ã¼ã³ã表ãã®ã§æéã¯ä¸è¦ã«ã»ã»ã» + //private int fromHour; //çµéæé + + private String attackCountry; //æ»æå½å ("é" or "å" ..) + private String attackGeneral; //ç·å¤§å° ("å¼µé¼" ..) + private int attackPeoples; //æ»æå´åå 人æ°(ã¦ã¼ã¶ã¼æ°) + private int attackSoldiers; //æ»æå´ ç·å µå + + private String defenceCountry; //é²å¾¡å½å ("è" or "é" ..) + private String defenceGeneral; //ç·å¤§å° ("å¼µé¼" ..) + private int defencePeoples; //é²å¾¡å´åå 人æ°(ã¦ã¼ã¶ã¼æ°) + private int defenceSoldiers; //é²å¾¡å´ ç·å µå + + public void setAttackCountry(String countryID){ + switch(Integer.parseInt(countryID)){ + case 1: + attackCountry = "é"; + break; + case 2: + attackCountry = "å"; + break; + case 3: + attackCountry = "è"; + break; + default: + break; + } + + } + public void setDefenceCountry(String countryID){ + switch(Integer.parseInt(countryID)){ + case 1: + defenceCountry = "é"; + break; + case 2: + defenceCountry = "å"; + break; + case 3: + defenceCountry = "è"; + break; + default: + break; + } + } + + public void setPastDay(String pastday){ + pastDay = Integer.parseInt(pastday); + } + + public int getPastDay(){ + return pastDay; + } + + public String getlocation() { + return location; + } + + public int getRoomid() { + return this.roomid; + } + + + public String getRoomName() { + return this.location; + } + + public void setRoomid(int id) { + this.roomid = id; + } + + public void setlocation(String location) { + this.location = location; + } + + public void setOngoing(boolean going) + { + this.ongoing = going; + } + + public void setGeneralAndPeople(String attackGeneral,int attackPeoples, int attackSoldiers,String defenceGeneral,int defencePeoples,int defenceSoldiers){ + this.attackGeneral = attackGeneral; + this.attackPeoples = attackPeoples; + this.attackSoldiers = attackSoldiers; + this.defenceGeneral = defenceGeneral; + this.defencePeoples = defencePeoples; + this.defenceSoldiers = defenceSoldiers; + } + + public boolean isOngoing(){ + if(ongoing){ + return true; + }else{ + return false; + } + } + + public String getAll_jp(){ + String ret= ""; + if(pastDay == 0){ + ret = location+" éæ¦å\n\n"+attackCountry+" è» ç·å¤§å° "+attackGeneral +"\n åå äººæ° "+attackPeoples+"人 å µå "+attackSoldiers+"\n VS\n"+defenceCountry+" è» ç·å¤§å° "+defenceGeneral +"\n åå äººæ° "+defencePeoples+"人 å µå "+defenceSoldiers+"\n"; + }else{ + ret = location+" "+pastDay+"æ¥\n\n"+attackCountry+" è» ç·å¤§å° "+attackGeneral +"\n åå äººæ° "+attackPeoples+"人 å µå "+attackSoldiers+"\n VS\n"+defenceCountry+" è» ç·å¤§å° "+defenceGeneral +"\n åå äººæ° "+defencePeoples+"人 å µå "+defenceSoldiers+"\n"; + } + return ret; + } + } + +} \ No newline at end of file Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Opening.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Opening.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/Opening.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,449 @@ +package jp.or.cute.sangokushi; + +import java.io.InputStream; +import java.net.URI; + +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.DefaultHttpClient; +import org.json.JSONException; +import org.json.JSONObject; + +import jp.or.cute.sangokushi.httpclient.HttpClient; +import jp.or.cute.sangokushi.httpclient.AuthenticateCommand; +import jp.or.cute.sangokushi.httpclient.HttpCommand; + +import jp.or.cute.sangokushi.httpclient.HttpRunnable; + +import jp.or.cute.sangokushi.model.Player; + +import jp.or.cute.sangokushi.twitter.TwitterOAuth; +import jp.or.cute.sangokushi.twitter.TwitterOperator; +import android.app.Activity; +import android.app.ProgressDialog; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.media.MediaPlayer; +import android.os.AsyncTask; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.view.animation.Animation; +import android.view.animation.AnimationUtils; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.Toast; + +/** + * ãªã¼ããã³ã°ç»é¢ç¨ã¢ã¯ãã£ããã£ã¼ + * @author non + * @author iST + * @version 0.1 + * @since 2010/03/26 + */ +public class Opening extends Activity { + public static final String PREFS_KEY_USERINFO = "PrefsUserInfo"; + public static final String PREFS_KEY_TWITTERINFO = "PrefsTwitterInfo"; + + public static final int RESULT_OAUTH = 1001; + public static final int RESULT_INIT = 1002; + public static final int RESULT_LOBBY = 1003; + + //éä¿¡ç¨ã¯ã©ã¤ã¢ã³ã + HttpClient mHttpClient; + + //TwitterAPIå¶å¾¡ + private TwitterOperator mOperator; + //ã¹ã¿ã¼ããã¿ã³ + private Button mStartButton; + private Button mTwitterButton; + private Button mLobbyButton; + + private ProgressDialog mProgress; + //ããã¯ã°ã©ã¦ã³ãåçãã¬ã¤ã¤ã¼ + private MediaPlayer mMediaPlayer; + //ãã¬ã¤ã¤ã¼ + Player mPlayer; + + /* + * èªè¨¼å¦çã®ãã³ãã© + * TwitterCredentialRunnableããsendããã + */ + private Handler mAuthenticateHandler = new Handler(){ + public void handleMessage(Message msg){ + JSONObject json = (JSONObject) msg.obj; + if(json != null){ + //ãµã¼ãã¼ã¸èªè¨¼æ å ±ï¼TwitterIDï¼ãéä¿¡ããã²ã¼ã å´ã®èªè¨¼ãè¡ã + authenticateServer(json); + }else{ + //èªè¨¼ãã¨ãããªããã°Twitterèªè¨¼ç»é¢ã¸é·ç§» + //startOAuth(); + startHttpClient(); + } + } + }; + + + private void startHttpClient(){ + try{ + Intent intent = new Intent(this, TwitterOAuth.class); + //intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); + startActivityForResult(intent, RESULT_OAUTH); + }catch(Exception e){ + e.printStackTrace(); + } + } + + + /* + * ã²ã¼ã ãµã¼ãã¼ã¸ã®ç»é²ã»èªè¨¼ã®ãã³ãã© + */ + private Handler mGameAuthenticateHandler = new Handler(){ + public void handleMessage(Message msg){ + JSONObject json = (JSONObject) msg.obj; + + try { + if(json != null){ + JSONObject account = json.getJSONObject("account"); + //ã¹ã¿ã¼ããã¿ã³è¡¨ç¤º + mStartButton.setText(getString(R.string.start_button)); + mStartButton.setEnabled(true); + + String image_path = account.getString("profile_image_url"); + downloadTwitterImage(image_path); + } + } catch (JSONException e1) { + e1.printStackTrace(); + } + + if(mProgress != null){ + mProgress.dismiss(); + } + + if(mMediaPlayer != null && mMediaPlayer.isPlaying()){ + mMediaPlayer.stop(); + } + } + }; + + //Twitterç»ååå¾ã表示 + private void downloadTwitterImage(String uri){ + DownloadImageTask task = new DownloadImageTask(); + task.execute(uri); + } + + /* + * TODO + * Lobbyé·ç§» @akifumi3 + * ä¸æçã«ããã¼ã¸é·ç§» + * Openingãã§ãããåé¤ãã¾ã + */ + private void startLobby(){ + try{ + Intent intent = new Intent(this, Lobby.class); + //intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); + startActivityForResult(intent, RESULT_LOBBY); + }catch(Exception e){ + e.printStackTrace(); + } + } + + private void startInitialize(){ + try{ + Intent intent = new Intent(this, Initialization.class); + startActivityForResult(intent, RESULT_INIT); + }catch(Exception e){ + e.printStackTrace(); + } + } + + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setContentView(R.layout.opening); + + //ãªã¼ããã³ã°ã¢ãã¡ã¼ã·ã§ã³ + ImageView logo = (ImageView)findViewById(R.id.logo); + Animation anim = AnimationUtils.loadAnimation(this, R.anim.logo_scale); + logo.startAnimation(anim); + + //mp3追å + mMediaPlayer = MediaPlayer.create(this, R.raw.bgm); + mMediaPlayer.setLooping(true); + + //éä¿¡ã¯ã©ã¤ã¢ã³ã + mHttpClient = HttpClient.getInstance(); + //ã¹ã¿ã¼ããã¿ã³ã¯èªè¨¼çµäºã¾ã§é表示 + mStartButton = (Button)findViewById(R.id.start_button); + //mStartButton.setEnabled(false); + mTwitterButton = (Button)findViewById(R.id.twitter_button); + + mLobbyButton = (Button)findViewById(R.id.lobby_button); + mLobbyButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + startLobby(); + } + }); + + //ä¿åãã¦ããæ å ±ã«ãã£ã¦é·ç§»ãæ±ºå® + int startBtnTitle = R.string.title_start; + //ã²ã¼ã ãã¬ã¤ã¤ã¼æ å ± + mPlayer = new Player(this); + if(mPlayer.getUserID() == null){ + startBtnTitle = R.string.title_initialization; + } + mStartButton.setText(startBtnTitle); + mStartButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + if(mPlayer.getUserID() == null){ + //åæè¨å®ç»é¢ã¸ + startInitialize(); + }else{ + //ããã¼ç»é¢ã¸ + startLobby(); + } + } + }); + if(mPlayer.getUserName() != null){ + Toast.makeText(this, "ãããã" + mPlayer.getUserName() + "æ§", Toast.LENGTH_LONG).show(); + } + + //Twitterèªè¨¼ãã§ã㯠+ //Openingç»é¢è¡¨ç¤ºä¸ã«Twitterã®èªè¨¼æ å ±ã確èªããã + mOperator = new TwitterOperator(this); + if(mOperator.getTwitterToken() == null){ + mTwitterButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + mOperator.asyncGetCredential(mAuthenticateHandler); + } + }); + }else{ + mTwitterButton.setEnabled(false); + } + } + + @Override + protected void onResume() { + super.onResume(); + if(mMediaPlayer != null){ + mMediaPlayer.start(); + } + } + + @Override + protected void onPause() { + super.onPause(); + if(mMediaPlayer != null){ + mMediaPlayer.stop(); + } + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); + + menu.add(0,10,0, getText(R.string.menu_reset_userstate)); + + return true; + } + + @Override + public boolean onMenuItemSelected(int featureId, MenuItem item) { + super.onMenuItemSelected(featureId, item); + + switch(item.getItemId()){ + case 10: + String msg = (String) getText(R.string.menu_reset_userstate_comlplatemessage); + //SharedPreferencesã«ä¿åãã¦ããæ å ±ãæ¶å» + SangokushiPreferences pref = new SangokushiPreferences(this); + if(pref.getUserID() == null || pref.getUserID().length() == 0){ + msg = (String) getText(R.string.menu_reset_userstate_notregistered); + }else{ + //SessionIDåé¤ + pref.removeValue(SangokushiPreferences.SESSION_ID); + //ã¦ã¼ã¶ã¼IDãã¦ã¼ã¶ã¼å + pref.removeValue(SangokushiPreferences.USER_ID); + pref.removeValue(SangokushiPreferences.USER_NAME); + + //æå±å½IDãè¨å® + pref.removeValue(SangokushiPreferences.COUNTRY_ID); + } + Toast.makeText(this, msg, Toast.LENGTH_LONG).show(); + break; + } + + return true; + } + + /* + * Twitterèªè¨¼ + */ + private void startOAuth(){ + try{ + Intent intent = new Intent(this, TwitterOAuth.class); + //intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); + startActivityForResult(intent, RESULT_OAUTH); + }catch(Exception e){ + e.printStackTrace(); + } + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + if(requestCode == RESULT_OAUTH){ + //èªè¨¼ç¨Activityï¼TwitterOAuthï¼ããã®æ»ã + if(resultCode == RESULT_OK){ + mTwitterButton.setEnabled(false); + //èªè¨¼OKãªã®ã§ããµã¼ãã¼ã«TwitterIDãéä¿¡ãã¦å¿ è¦ãªæ å ±ãåå¾ãã + //authenticateServer(); + }else{ +// //èªè¨¼NGãªã®ã§ãèªè¨¼ãã¿ã³ã表示 +// mStartButton.setText(getString(R.string.authenticate_button)); +// mStartButton.setEnabled(true); + } + } + } + + /* + * Twitterã®èªè¨¼æ å ±ã使ã£ã¦ãã²ã¼ã ãµã¼ãã¼ã¸èªè¨¼ãè¡ã + * æ°è¦ã®å ´åã¯ã²ã¼ã ãµã¼ãã¼ã«TwitterIDã¨ã¦ã¼ã¶ã¼æ å ±ãç»é² + * æ¢ã«ç»é²ããã¦ããå ´åã¯ãTwitterIDãKeyã¨ãã¦æ å ±ãåå¾ + */ + private void authenticateServer(JSONObject json){ + String screen_name = json.optString("screen_name", (String) getString(R.string.bad_value)); + String twitter_id = json.optString("id", (String) getString(R.string.bad_value)); + //ãã©ãã¼ãã¦ãã + int friends_count = 0; + try { + friends_count = json.getInt("friends_count"); + } catch (JSONException e) { + e.printStackTrace(); + } + //ãã©ãã¼ããã¦ãã + int followers_count = 0; + try { + followers_count = json.getInt("followers_count"); + } catch (JSONException e) { + e.printStackTrace(); + } + //Image + String image = ""; + try { + image = json.getString("profile_image_url"); + } catch (JSONException e) { + e.printStackTrace(); + } + //åå¾ããæ å ±ãä¿å + //èªè¨¼æ å ±åå¾ + SharedPreferences settings = getSharedPreferences(TwitterOperator.PREFS, Context.MODE_PRIVATE); + SharedPreferences.Editor editor = settings.edit(); + if(twitter_id == null) { + editor.remove(TwitterOperator.USER_TWITTER_ID); + } + else { + editor.putString(TwitterOperator.USER_TWITTER_ID, twitter_id); + } + if(screen_name == null) { + editor.remove(TwitterOperator.USER_TWITTER_NAME); + } + else { + editor.putString(TwitterOperator.USER_TWITTER_NAME, screen_name); + } + + //ãµã¼ãã¼ã«ID,NAMEãéä¿¡ãã¦èªè¨¼ + mProgress = ProgressDialog.show(this, + getText(R.string.auth_progress_title), + getText(R.string.auth_progress_text), + true, + false); + String user_token = ""; + String user_secret = ""; + if(settings.contains(TwitterOperator.USER_TOKEN) && settings.contains(TwitterOperator.USER_SECRET)) { + user_token = settings.getString(TwitterOperator.USER_TOKEN, null); + user_secret = settings.getString(TwitterOperator.USER_SECRET, null); + if(!(user_token == null || user_secret == null)) { + SangokushiPreferences pref = new SangokushiPreferences(this); + HttpCommand command = new AuthenticateCommand(HttpCommand.POST, pref.getSessionID()); + command.setParam("oauth_token", user_token); + command.setParam("oauth_verifier", user_secret); + command.setParam("twitter_id", twitter_id); + if(mHttpClient == null){ + mHttpClient = HttpClient.getInstance(); + } + mHttpClient.setHttpCommand(command); + + HttpRunnable runnable = new HttpRunnable(mGameAuthenticateHandler, mHttpClient); + new Thread(runnable).start(); + return; + } + } + // TODO èªè¨¼æ å ±ãç¡ãã®ã§ãµã¼ãã¼ã¸ã¢ã¯ã»ã¹ããªã + // ã¨ã©ã¼è¡¨ç¤ºããå度èªè¨¼ãä¿ãã¡ãã»ã¼ã¸ã表示 + + } + + private void setResultImage(Bitmap image){ + ImageView view = (ImageView) findViewById(R.id.twitter_image); + view.setImageBitmap(image); + view.setVisibility(ImageView.VISIBLE); + } + /* + * åãããããããã«Twitterç»åãåå¾ãã¦è¡¨ç¤º + * + */ + private class DownloadImageTask extends AsyncTask<String, Integer, Bitmap> { + private DefaultHttpClient mClient; + private HttpGet mGetMethod; + + private Bitmap downloadImage(String uri) { + try { + mGetMethod.setURI(new URI(uri)); + HttpResponse resp = mClient.execute(mGetMethod); + if (resp.getStatusLine().getStatusCode() < 400) { + InputStream is = resp.getEntity().getContent(); + Bitmap bit = createBitmap(is); + is.close(); + return bit; + } + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + private Bitmap createBitmap(InputStream is) { + return BitmapFactory.decodeStream(is); + } + + @Override + protected void onPreExecute() { + mClient = new DefaultHttpClient(); + mGetMethod = new HttpGet(); + } + //ããã¯ã°ã©ã¦ã³ãã§ç»åããã¦ã³ãã¼ããã + @Override + protected Bitmap doInBackground(String... params) { + String uri = params[0]; + return downloadImage(uri); + } + + //ç»åãæç»ãã + @Override + protected void onPostExecute(Bitmap result) { + Opening.this.setResultImage(result); + } + } +} \ No newline at end of file Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/SangokushiPreferences.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/SangokushiPreferences.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/SangokushiPreferences.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,88 @@ +package jp.or.cute.sangokushi; + +import android.R.bool; +import android.content.Context; +import android.content.SharedPreferences; + +public class SangokushiPreferences { + public static final String PREFS = "OpenSangokushiPrefs"; + public static final String SESSION_ID = "SessionID"; + public static final String USER_NAME = "UserName"; + public static final String USER_ID = "UserID"; + public static final String COUNTRY_ID = "CountryID"; + + public static final int RESULT_OAUTH = 1001; + public static final int RESULT_INIT = 1002; + public static final int RESULT_LOBBY = 1003; + + private SharedPreferences mSettings; + private SharedPreferences.Editor mEditor; + private Context mContext; + + public SangokushiPreferences(Context context) { + mContext = context; + mSettings = mContext.getSharedPreferences(PREFS, Context.MODE_PRIVATE); + } + + /* + * SessionIDã®åã渡ã + */ + public String getSessionID(){ + return getStringPrefValue(SESSION_ID); + } + public void setSessionID(String id){ + setStringPrefValue(SESSION_ID, id); + } + + /* + * UserIDã®åã渡ã + */ + public String getUserID(){ + return getStringPrefValue(USER_ID); + } + public void setUserID(String id){ + setStringPrefValue(USER_ID, id); + } + + /* + * UserNameã®åã渡ã + */ + public String getUserName(){ + return getStringPrefValue(USER_NAME); + } + public void setUserName(String name){ + setStringPrefValue(USER_NAME, name); + } + + /* + * æå±å½IDã®åã渡ã + */ + public String getCountryID(){ + return getStringPrefValue(COUNTRY_ID); + } + public void setCountryID(String id){ + setStringPrefValue(COUNTRY_ID, id); + } + + private String getStringPrefValue(String Key){ + String value = null; + if(mSettings.contains(Key)) { + value = mSettings.getString(Key, null); + } + return value; + } + private boolean setStringPrefValue(String key, String value){ + mEditor = mSettings.edit(); + mEditor.putString(key, value); + return mEditor.commit(); + } + + /* + * ä¿åãã¼ã¿ã®åé¤ + */ + public boolean removeValue(String key){ + mEditor = mSettings.edit(); + mEditor.remove(key); + return mEditor.commit(); + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/dummy/DummyMapData.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/dummy/DummyMapData.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/dummy/DummyMapData.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,86 @@ +package jp.or.cute.sangokushi.dummy; + +import android.graphics.Color; + +public class DummyMapData { + public static int[][] createDummyMap(){ + int[][] _map_iryou = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,5,5,5,1,1,1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3}, + {1,1,1,1,1,1,1,5,5,5,1,1,1,1,1,1,1,1,5,5,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,5,5,1,1,1,1,1,5,5,5,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,8,1,1,4,4,4,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,5,5,5,1,1,1,5,5,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,8,8,1,4,4,4,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,5,5,1,1,5,1,1,1,1,1,1,1,1,1,1,5,5,1,1,1,1,1,1,1,1,1,1,1,1,8,1,4,4,4,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,5,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,1,8,1,4,4,4,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,1,4,4,4,1,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,8,8,4,4,4,1,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5,1,1,1,1,1,8,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,8,8}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,5,1,1,8,1,4,4,3,3,3,3,3,3,3,3,3,8,8,8,8,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,8,1,4,4,3,3,3,3,3,3,3,3,8,8,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,8,8,1,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,8,3,3,3,3,3,3,3,8,8,8,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,1,1,1,8,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,3,8,8,3,3,3,3,3,8,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,3,3,3,8,8,3,3,8,8,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,3,3,3,3,8,8,8,8,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,5,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,5,3,3,3,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,5,5,3,8,8,3,8,8,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,5,3,8,3,3,3,8,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,5,8,8,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,8,3,3,3,3,3,8,8,8,8,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,8,8,5,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,8,3,5,5,3,3,3,3,3,3,3,8,8,8,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,8,8,8,3,3,5,5,3,3,3,3,3,3,3,3,8,8,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,8,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,8,8,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,8,8,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,8,8,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,8,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,8,8}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,8,8,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,8}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,8,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,8,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,8,8,8,8,1,1,8,8,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,8,8,8,8,1,8,8,8,8,1,1,1,1,1,1,1,1,1,1,1,1,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,8,8,1,1,1,1,1,1,1,8,8,8,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,8,1,1,8,8,8,8,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,8,8,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,6,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3}, + {1,1,1,1,1,1,1,1,1,6,6,6,6,6,1,1,6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1,1,6,6,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3}, + {1,1,1,1,1,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3}, + {1,1,1,6,6,6,1,1,1,6,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3}, + {1,1,1,1,1,1,1,1,6,6,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5}, + {1,1,1,1,1,1,1,1,1,6,6,1,1,1,1,1,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,6,6,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3} + }; + return _map_iryou; + } + + public static int[] getMapColors(){ + int[] _colors = { + Color.argb(255, 0, 128, 0), + Color.argb(255, 0, 255, 0), + Color.argb(255, 60, 252, 0), + Color.argb(255, 255, 255, 204), + Color.argb(255, 66, 114, 206), + Color.argb(255, 79, 209, 227), + Color.argb(255, 64, 128, 128), + Color.argb(255, 85, 85, 85) + }; + + return _colors; + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/AuthenticateCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/AuthenticateCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/AuthenticateCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,14 @@ +package jp.or.cute.sangokushi.httpclient; + +/* + * ã²ã¼ã ãµã¼ãã¼ã¸ã®èªè¨¼å¦ç + * @author iST + * @version 0.1 + * @since 2010/03/29 + */ +public class AuthenticateCommand extends HttpCommand { + public AuthenticateCommand(String method, String sessionID) { + super(method ,sessionID); + this.setPath(HttpClient.AUTH_PATH); + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/BattleCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/BattleCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/BattleCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,165 @@ +package jp.or.cute.sangokushi.httpclient; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLEncoder; +import java.util.Iterator; + +import android.util.Log; + +/* + * ã«ã¼ã é室 + * @author iST + * @version 0.1 + * @since 2010/05/04 +*/ +public class BattleCommand extends HttpCommand{ +/* + protected final static String BASE_PATH = "http://sangokushidev.cute.or.jp/index.php"; + protected final static int BATTLE_COMMAND_ID = 0; + + // ç»é²ããã¦ããã³ãã³ãï¼æªéä¿¡ï¼ + // éä¿¡ãããã¨0ã«ãªã + private int commandCount = 0; + private String[] command = new String[2]; +*/ + private String mUserid; + private String mRoomid; + + public void setUserAndRoom(String user,String room) + { + mUserid = user; + mRoomid = room; + } + public void MoveCell(int x,int y) + { + int cell = y * 45 + x + 1; + this.setParam(HttpClient.COMMAND_PLAYERID, mUserid); + this.setParam(HttpClient.COMMAND_LOBBYID, mRoomid); + this.setParam(HttpClient.PARAMS_MOVEMAPCHIPNO, Integer.toString(cell)); + } + + public void BattlePlayer(int x,int y) { + int cell = y * 45 + x + 1; + this.setParam(HttpClient.COMMAND_PLAYERID, mUserid); + this.setParam(HttpClient.COMMAND_LOBBYID, mRoomid); + this.setParam(HttpClient.PARAMS_BATTLEMAPCHIPNO, Integer.toString(cell)); + } +/* + public String httpGet(String location){ + HttpURLConnection http = null; + InputStream in = null; + URL url = null; + String response = null; + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + // æå®ãã URL ã®ä½æ + String urlString = BASE_PATH + "?" + location; + Log.d("httpget","urlString="+urlString); + url = new URL(urlString); //location); + // HTTPéä¿¡ã®åæå + http = (HttpURLConnection) url.openConnection(); + // HTTPéä¿¡ã®ã¡ã½ããæå®(ä»åã¯åå¾ã®ã¿ãªã®ã§ GET ãæå®) + http.setRequestMethod("GET"); + // UserAgentã®ã»ãã + //http.setRequestProperty("User-Agent", "Android Application"); + // HTTPéä¿¡éå§ + http.connect(); + Log.d("httpget","status="+Integer.toString(http.getResponseCode())); + // HTTPéä¿¡ã§ãã¼ã¿ãåå¾ + in = http.getInputStream(); + int len; + byte[] buf = new byte[4096]; + while ( (len = in.read(buf))> 0) { + baos.write(buf, 0, len); + } + Log.d("httpget","status="+Integer.toString(http.getResponseCode())); + // åå¾ãããã¼ã¿ã Stringã¸å¤æ + response = new String(baos.toByteArray()); + } catch (Exception e) { + e.printStackTrace(); + } finally{ + // HTTP éä¿¡ã®å¾å§æ« + try{ + in.close(); + } catch (Exception e) {} + try { + http.disconnect(); + } catch (Exception e) {} + } + Log.d("BattleCommand","response="+response); + return response; + } + + + + public String httpPost(String cmd) { + String result = ""; + HttpURLConnection conn = null; + String postdata = ""; + + // postéä¿¡ãã¼ã¿ãï¼æ¬ã®æååã«ã¾ã¨ãã + try { + URL url = new URL(BASE_PATH); + Log.d("BattleCommand", "cmd=\"" + cmd +"\""); + + conn = (HttpURLConnection)url.openConnection(); + conn.setReadTimeout(10*1000 mç§ ); + conn.setConnectTimeout(15*1000 mç§ ); + conn.setRequestMethod("POST"); + conn.setDoInput(true); + conn.setDoOutput(true); + if (cmd.length() > 0) { + OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream(),"UTF-8"); + writer.write(cmd); + writer.flush(); + writer.close(); + } + conn.connect(); + InputStreamReader reader = new InputStreamReader(conn.getInputStream(),"UTF-8"); + while (true) { + char[] buffer = new char[4096]; // #chars <= #bytes + int nchars = reader.read(buffer); + if (nchars < 0) + break; + result += String.valueOf(buffer, 0, nchars); + } + reader.close(); + Log.d("BattleCommand","result="+result); + } catch (IOException e) { + result = null; + Log.d("BattleCommand","Error message="+e.getMessage()); + } finally { + if (conn != null) conn.disconnect(); + } + return result; + } + +*/ public BattleCommand(String sessionID) { + super(POST,sessionID); + this.setPath(HttpClient.BASE_PATH); + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_SET_BATTLE); + } + + + public BattleCommand(String userid,String roomid,String sessionID) { + super(POST,sessionID); + mUserid = userid; + mRoomid = roomid; + this.setPath(HttpClient.BASE_PATH); + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_SET_BATTLE); + } + + public BattleCommand(String method,String sessionID) { + super(POST,sessionID); + this.setPath(HttpClient.BASE_PATH); + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_SET_BATTLE); + } +} + + Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/BattleResultCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/BattleResultCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/BattleResultCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,28 @@ +package jp.or.cute.sangokushi.httpclient; + +/* + * æ¦éçµæè¦æ± + * @author iST + * @version 0.1 + * @since 2010/05/10 +*/ +public class BattleResultCommand extends HttpCommand{ + + public BattleResultCommand(String method, String sessionID,String room) { + super(method ,sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_GET_BATTLE); + this.setParam(HttpClient.COMMAND_LOBBYID,room); + } + + public BattleResultCommand(String method, String sessionID) { + super(method ,sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_GET_BATTLE); + } +} + + + Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/CountryStateCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/CountryStateCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/CountryStateCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,21 @@ +package jp.or.cute.sangokushi.httpclient; + +/* + * æå±å½åå¾ + * @author non + * @author iST + * @version 0.1 + * @since 2010/03/26 +*/ +public class CountryStateCommand extends HttpCommand{ + + public CountryStateCommand(String method, String sessionID) { + super(method ,sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_GET_COUNTRY_STATE); + } +} + + + Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/EnteringLobbyCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/EnteringLobbyCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/EnteringLobbyCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,27 @@ +package jp.or.cute.sangokushi.httpclient; +/* + * ã«ã¼ã å ¥å®¤ + * @author iST + * @version 0.1 + * @since 2010/05/04 +*/ +public class EnteringLobbyCommand extends HttpCommand{ + + public EnteringLobbyCommand(String method, String sessionID) { + super(method ,sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_EXEC_LOBBY_IN); + } + public EnteringLobbyCommand(String method, String id, String player_id, String sessionID) { + super(method ,sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_EXEC_LOBBY_IN); + this.setParam(HttpClient.PARAMS_LOBBY_ID,id); + this.setParam(HttpClient.PARAMS_PLAYER_ID,player_id); + } +} + + + Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpClient.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpClient.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpClient.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,143 @@ +package jp.or.cute.sangokushi.httpclient; + +import java.io.IOException; +import java.util.ArrayList; + +import org.apache.http.Header; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.HttpResponseException; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.message.BasicHeader; +import org.apache.http.params.CoreProtocolPNames; +import org.apache.http.util.EntityUtils; + +public class HttpClient { + private static HttpClient instance = new HttpClient(); + + //protected final static String BASE_URL = "http://210.196.147.49/"; + protected final static String BASE_URL = "http://210.196.147.48/"; + protected final static String BASE_PATH = "index.php"; + protected final static String AUTH_PATH = "authenticate/auth"; + + //==== ã³ãã³ã ===== + public final static String PARAMS_COMMAND = "data"; + public final static String PARAMS_SESSION_ID = "sid"; + //ã¦ã¼ã¶ã¼èªè¨¼ï¼æ°è¦ï¼ã³ãã³ã + public final static String COMMAND_USERAUTH_NEW = "U01001"; + //ã¦ã¼ã¶ã¼èªè¨¼ï¼ç¢ºèªï¼ã³ãã³ã + public final static String COMMAND_USERAUTH_CHECK = "U01002"; + //æå±å½è¨å®ã³ãã³ã + public final static String COMMAND_SET_COUNTRY_STATE = "C01001"; + //æå±å½æ å ±åå¾ã³ãã³ã + public final static String COMMAND_GET_COUNTRY_STATE = "C01002"; + //ã¦ã¼ã¶ã¼åæãã©ã¡ã¼ã¿åå¾ã³ãã³ã + public final static String COMMAND_GET_USER_PARAMS = "U01003"; + //ã¦ã¼ã¶ã¼åæä½ç½®è¨å®ã³ãã³ã + public final static String COMMAND_SET_USER_POSITION = "U01004"; + //ã¦ã¼ã¶ã¼ã¹ãã¼ã¿ã¹åå¾ã³ãã³ã + public final static String COMMAND_GET_USER_STATUS = "U01005"; + //AIæ¦å°ãã©ã¡ã¼ã¿åå¾ã³ãã³ã + public final static String COMMAND_GET_AI_PARAMS = "A01001"; + //ã«ã¼ã æ å ±åå¾ã³ãã³ã + public final static String COMMAND_GET_LOBBY_INFO = "R01001"; + //ã«ã¼ã ã¹ãã¼ã¿ã¹åå¾ã³ãã³ã + public final static String COMMAND_GET_LOBBY_STATUS = "R01002"; + // ã«ã¼ã ã®ã¿ã¼ã³æ å ±åå¾ã³ãã³ã + public final static String COMMAND_GET_LOBBY_TURN = "R01005"; + //ã«ã¼ã å ¥å®¤ã³ãã³ã + public final static String PARAMS_LOBBY_ID = "roomid"; + public final static String PARAMS_PLAYER_ID = "userid"; + public final static String COMMAND_EXEC_LOBBY_IN = "R01003"; + //ã«ã¼ã é室ã³ãã³ã + public final static String COMMAND_EXEC_LOBBY_OUT = "R01004"; + //ãããæ å ±åå¾ã³ãã³ã + public final static String COMMAND_GET_MAP_INFO = "M01001"; + //æ¦éæ å ±éä¿¡ã³ãã³ã + public final static String COMMAND_SET_BATTLE = "B01001"; + public final static String COMMAND_LOBBYID ="roomid"; + public final static String COMMAND_PLAYERID ="userid"; + public final static String PARAMS_MOVEMAPCHIPNO="movemapchipno"; + public final static String PARAMS_BATTLEMAPCHIPNO="battlemapchipno"; + //æ¦éçµæåå¾ã³ãã³ã + public final static String COMMAND_GET_BATTLE = "B01002"; + + private HttpCommand mHttpCommand; + public void setHttpCommand(HttpCommand command){ + mHttpCommand = command; + } + public HttpCommand getHttpCommand(){ + return mHttpCommand; + } + + private DefaultHttpClient mHttpclient; + public DefaultHttpClient getHttpclient() { + return mHttpclient; + } + + public void setHttpclient(DefaultHttpClient httpclient) { + mHttpclient = httpclient; + } + + private HttpResponse mResponse; + public HttpResponse getResponse() { + return mResponse; + } + + public void setResponse(HttpResponse response) { + mResponse = response; + } + + private String mSessionID; + + private HttpClient() { + this.init(); + } + + public static HttpClient getInstance(){ + return instance; + } + + private void init(){ + mHttpclient = new DefaultHttpClient(); + mHttpclient.getParams().setParameter("http.useragent", "android-sangokushi"); + ArrayList<Header> params = new ArrayList<Header>(); + params.add(new BasicHeader("Accept-Encoding", "gzip, deflate")); + mHttpclient.getParams().setParameter("http.default-headers", params); + //417ã¨ã©ã¼å¯¾çã»ã»ã»ãã㪠+ mHttpclient.getParams().setParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false); + + } + + public Object execute(){ + String responseString = null; + + if(mHttpCommand != null){ + HttpPost method = mHttpCommand.execute(mSessionID); + + try { + this.setResponse(this.getHttpclient().execute(method)); + int statuscode = this.getResponse().getStatusLine().getStatusCode(); + + //ãªã¯ã¨ã¹ããæå 200 OK and 201 CREATED + if (statuscode == HttpStatus.SC_OK | statuscode == HttpStatus.SC_CREATED){ + responseString = EntityUtils.toString(this.getResponse().getEntity(),"UTF-8"); + } else { + throw new HttpResponseException(statuscode, "Response code is " + Integer.toString(statuscode)); + } + }catch (RuntimeException e) { + method.abort(); + //throw new RuntimeException(e); + } catch (ClientProtocolException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + + } + return responseString; + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,87 @@ +package jp.or.cute.sangokushi.httpclient; + +import java.util.ArrayList; +import java.util.List; + +import jp.or.cute.sangokushi.SangokushiPreferences; + +import org.apache.http.NameValuePair; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.protocol.HTTP; + +import android.util.Log; + +/* + * HTTPéä¿¡å¦çãåºåºã¯ã©ã¹ + * @author iST + * @version 0.1 + * @since 2010/05/04 +*/ +public class HttpCommand { + + private String mPath; + protected void setPath(String path){ + mPath = path; + } + + private List<NameValuePair> mNameValuePair; + public List<NameValuePair> getNameValuePair() { + return mNameValuePair; + } + + public void setNameValuePair(List<NameValuePair> nameValuePair) { + mNameValuePair = nameValuePair; + } + + public static final String POST = "post"; + public static final String GET = "get"; + private String mMethod; + private String mQuery; + + private String mSessionID; + + public void setParam(String key, String value){ + if(mMethod == POST){ + if(mNameValuePair == null){ + mNameValuePair = new ArrayList<NameValuePair>(); + } + mNameValuePair.add(new BasicNameValuePair(key, value)); + }else{ + if(mQuery != ""){ + mQuery += "&"; + } + mQuery += key + "=" + value; + } + } + + /* + * ã³ã³ã¹ãã©ã¯ã¿ + */ + public HttpCommand(String method, String sessionID) { + mMethod = method; + + if(sessionID != null){ + mSessionID = sessionID; + setParam("sessionid", sessionID); + } + } + + public HttpPost execute(String sessionID){ + this.setParam(HttpClient.PARAMS_SESSION_ID,sessionID); + + HttpPost method = null; + try { + method = new HttpPost(HttpClient.BASE_URL + mPath); + method.addHeader("Content-Type", "application/x-www-form-urlencoded"); + Log.d("execute","value="+this.getNameValuePair().toString()); + method.setEntity(new UrlEncodedFormEntity(this.getNameValuePair(), HTTP.UTF_8)); + return method; + } catch (Exception e) { + e.printStackTrace(); + } + return method; + } + +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpRunnable.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpRunnable.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/HttpRunnable.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,30 @@ +package jp.or.cute.sangokushi.httpclient; + +import android.os.Handler; +import android.os.Message; + +/** + * HTTPæ¥ç¶ + * @author iST + * @version 0.1 + * @since 2010/03/29 + */ +public class HttpRunnable implements Runnable { + private Handler mHandler; + private HttpClient mClient; + + public HttpRunnable(Handler handler, HttpClient client) { + mHandler = handler; + mClient = client; + } + + @Override + public void run() { + Object object = mClient.execute(); + + Message msg = new Message(); + msg.obj = object; + mHandler.sendMessage(msg); + } + +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/InitializeCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/InitializeCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/InitializeCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,16 @@ +package jp.or.cute.sangokushi.httpclient; + +/* + * åæç»é²å¦ç + * @author non + * @version 0.1 + * @since 2010/05/09 + */ +public class InitializeCommand extends HttpCommand { + public InitializeCommand(String method, String sessionID) { + super(method ,sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_USERAUTH_NEW); + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LeavingLobbyCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LeavingLobbyCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LeavingLobbyCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,21 @@ +package jp.or.cute.sangokushi.httpclient; +/* + * ã«ã¼ã é室 + * @author iST + * @version 0.1 + * @since 2010/05/04 +*/ +public class LeavingLobbyCommand extends HttpCommand{ + + public LeavingLobbyCommand(String method, String id, String player_id, String sessionID) { + super(method ,sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_EXEC_LOBBY_OUT); + this.setParam(HttpClient.PARAMS_LOBBY_ID,id); + this.setParam(HttpClient.PARAMS_PLAYER_ID,player_id); + } +} + + + Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LobbyInfoCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LobbyInfoCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LobbyInfoCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,20 @@ +package jp.or.cute.sangokushi.httpclient; + +/* + * ã«ã¼ã æ å ± + * @author iST + * @version 0.1 + * @since 2010/05/04 +*/ +public class LobbyInfoCommand extends HttpCommand{ + + public LobbyInfoCommand(String method, String sessionID) { + super(method ,sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_GET_LOBBY_INFO); + } +} + + + Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LobbyStatusCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LobbyStatusCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LobbyStatusCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,20 @@ +package jp.or.cute.sangokushi.httpclient; + +/* + * ã«ã¼ã ã¹ãã¼ã¿ã¹ + * @author iST + * @version 0.1 + * @since 2010/05/04 +*/ +public class LobbyStatusCommand extends HttpCommand{ + + public LobbyStatusCommand(String method, String sessionID) { + super(method ,sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_GET_LOBBY_STATUS); + } +} + + + Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LoginCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LoginCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/LoginCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,16 @@ +package jp.or.cute.sangokushi.httpclient; + +/* + * æ¢åã¦ã¼ã¶ã¼ãã°ã¤ã³å¦ç + * @author iST + * @version 0.1 + * @since 2010/05/09 + */ +public class LoginCommand extends HttpCommand { + public LoginCommand(String method, String sessionID) { + super(method, sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_USERAUTH_CHECK); + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/ResponceHandler.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/ResponceHandler.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/ResponceHandler.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,84 @@ +package jp.or.cute.sangokushi.httpclient; +import android.os.Handler; +import android.os.Message; + +public class ResponceHandler extends Handler{ + //==== ãµã¼ãã¼ã¨ã©ã¼ã³ã¼ã ===== + public final static String ERROR_CODE_DEFAULT = "01000"; + //ã¦ã¼ã¶ã¼åã®éè¤ + public final static String ERROR_CODE_INIT_DUPLICATION_USERNAME = "02000"; + //ã¦ã¼ã¶ã¼ç»é²æã¨ã©ã¼ + public final static String ERROR_CODE_INIT_NOT_ENTRY = "03000"; + //ã¦ã¼ã¶ã¼ç»é²æã¨ã©ã¼ + public final static String ERROR_CODE_INIT_NOT_ENTRY_OTHER = "04000"; + + //==== ã¬ã¹ãã³ã¹ã»ãã¬ã¼ã¿ ===== + public final static String RESPONCE_SEPARATOR = ">>"; + public final static String RESPONCE_PARTS_SEPARATOR = ","; + + private String mErrorCode; + public String getErrorCode() { + return mErrorCode; + } + public void setErrorCode(String errorCode) { + mErrorCode = errorCode; + } + + private boolean mErrorFlag = true; + private String mRequestCode; + + private String mResponce; + public String getResponce() { + return mResponce; + } + public void setResponce(String responce) { + mResponce = responce; + } + + private String[] mResponceArray; + + public String[] getResponceArray() { + return mResponceArray; + } + public void setResponceArray(String[] responceArray) { + mResponceArray = responceArray; + } + @Override + public void handleMessage(Message msg) { + super.handleMessage(msg); + mResponce = (String) msg.obj; + if(mResponce != null && mResponce instanceof String){ + mResponceArray = mResponce.split(RESPONCE_SEPARATOR); + } + handleHeader(); + } + private void handleHeader(){ + if(mResponceArray != null && mResponceArray.length > 0){ + String[] headers = mResponceArray[0].split(","); + if(headers != null && headers.length > 1){ + mRequestCode = headers[0]; + if(headers[1].equals("1")){ + mErrorFlag = true; + /** + *ãµã¼ãã¼ã¬ã¹ãã³ã¹ã®å½¢å¼ãå¤æ´ã«ããä¿®æ£ + *akifumi3 2010.05.12 + */ + //mErrorCode = headers[2]; + mErrorCode = mResponceArray[1]; + }else{ + mErrorFlag = false; + } + } + } + } + public boolean isError(){ + return mErrorFlag; + } + /* + * ã¬ã¹ãã³ã¹ã®">>"ã§åºåãããå 容ã«å¯¾ãã¦ãâ,âã§åå²ãã¦è¿å´ + * ã¨ãã£ã¦ãåã«splitããã ã + */ + public static String[] splitResponceParts(String part){ + return part.split(RESPONCE_PARTS_SEPARATOR); + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/RoomInfoCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/RoomInfoCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/RoomInfoCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,20 @@ +package jp.or.cute.sangokushi.httpclient; + +/* + * ã«ã¼ã æ å ± + * @author Takki + * @version 0.1 + * @since 2010/05/12 +*/ +public class RoomInfoCommand extends HttpCommand{ + + public RoomInfoCommand(String method, String sessionID,String roomid) { + super(method ,sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_GET_LOBBY_TURN); + this.setParam(HttpClient.COMMAND_LOBBYID,roomid); + } +} + + Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/UserStatusCommand.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/UserStatusCommand.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/httpclient/UserStatusCommand.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,18 @@ +package jp.or.cute.sangokushi.httpclient; + +/* + * æå±å½åå¾ + * @author akifumi3 + * @version 0.1 + * @since 2010/05/10 +*/ +public class UserStatusCommand extends HttpCommand{ + + public UserStatusCommand(String method, String sessionID) { + super(method ,sessionID); + this.setPath(HttpClient.BASE_PATH); + + this.setParam(HttpClient.PARAMS_COMMAND,HttpClient.COMMAND_GET_USER_STATUS); + } +} + Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/model/Player.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/model/Player.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/model/Player.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,390 @@ +package jp.or.cute.sangokushi.model; + +import jp.or.cute.sangokushi.R; +import jp.or.cute.sangokushi.SangokushiPreferences; +import jp.or.cute.sangokushi.view.MapView; +import android.content.Context; +import android.content.SharedPreferences; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Matrix; +import android.graphics.Paint; +import android.graphics.Rect; +import android.graphics.Paint.Style; +import android.util.Log; + +/** + * ãã¬ã¤ã¤ã¼ + * @author iST + * @author Takki + * @version 0.1.1 + * @since 2010/04/06 + * @change 2010/05/05 + */ +public class Player { + //è¨å®æ å ±key + public static final String PREFS = "OpenSangokushiPrefsPlayerFile"; + public static final String USER_NAME = "user_name"; + public static final String USER_ID = "user_id"; + + private static final int GO = 1; + private static final int GI = 0; + private static final int SYUKU = 2; + + public static final String GENERAL = "s"; + public static final String COMMANDER = "b"; + public static final String USER = "u"; + + private Context mContext; + //è¨å®æ å ± + private SharedPreferences mSettings; + private SangokushiPreferences mPreferences; + + private String mCommanderClass = this.USER; + private String mName; + private int mPower = 0; + private int mMobilty = 0; + private int mCurrentMapX = 0; + private int mCurrentMapY = 0; + + private static final int cell_x = 45; + private static final int cell_y = 45; + // ãã¬ã¼ã¤ã¼æ¬äºº + private boolean mMySelf = false; + + // + private int mCountry = -1; + + public void setMySelf() { + mMySelf = true; + } + + public boolean getMySelf() { + return mMySelf; + } + + public void setCountry(int country) { + mCountry = country; + } + + public void setInfo(int power,int mobilty,String cmdClass,int country,int cell) + { +// Log.d("Player","setInfo(power="+Integer.toString(power)+",cmdClass="+cmdClass+",country="+Integer.toString(country)+",cell="+Integer.toString(cell)+")"); + cell--; + int x = cell % cell_x; + int y = cell / cell_y; + this.mMapX = x; + this.mMapY = y; + this.mCountry = country; + this.mPower = power; + this.mMobilty = mobilty; + this.mCommanderClass = cmdClass; + } + + public String getCountry() { + switch(mCountry) { + case GO: + return "GO"; + case GI: + return "GI"; + case SYUKU: + return "SYUKU"; + } + return ""; + } + + public int getCountryID() { + return mCountry; + } + + public static String getCountryName(int country) { + switch(country) { + case GO: + return "å"; + case GI: + return "é"; + case SYUKU: + return "è"; + } + return ""; + } + + public String getCountryName() { + switch(mCountry) { + case GO: + return "å"; + case GI: + return "é"; + case SYUKU: + return "è"; + } + return ""; + } + + public String getName() { + return mName; + } + + public void setName(String name) { + mName = name; + } + + //ã¦ã¼ã¶ã¼ID + public String getUserID() { + if(mPreferences == null){ + mPreferences = new SangokushiPreferences(mContext); + } + return mPreferences.getUserID(); + } + + // å µå + public int getPower() { + return mPower; + } + + public String getCommanderID() + { + return this.mCommanderClass; + } + + public String getCommanderClass() { + Log.d("getCommanderClass","class=\""+mCommanderClass+"\""); + if (this.mCommanderClass.equals(GENERAL)) { + //return this.mContext.getString(R.string.general); + return "ç·å¤§å°"; + } + else if (this.mCommanderClass.equals(COMMANDER)) + { + //return this.mContext.getString(R.string.commander); + return "æ¦å°"; + } else { + //return this.mContext.getString(R.string.game_user); + return "éé·"; + } + } + + public void setUserID(String id) { + SharedPreferences.Editor editor = mSettings.edit(); + if(id == null) { + editor.remove(USER_ID); + } + else { + editor.putString(USER_ID, id); + } + } + //ã¦ã¼ã¶ã¼å + public String getUserName() { + if(mPreferences == null){ + mPreferences = new SangokushiPreferences(mContext); + } + return mPreferences.getUserName(); + +// if(mSettings != null && mSettings.contains(USER_NAME)){ +// return mSettings.getString(USER_NAME, null); +// } +// return null; + } + public void setUserName(String name) { + SharedPreferences.Editor editor = mSettings.edit(); + if(name == null) { + editor.remove(USER_NAME); + } + else { + editor.putString(USER_NAME, name); + } + } + + //移åå¯è½ç¯å² + private int mMoveArea = 5; + + //ãããä¸ã®ä½ç½® + public int mMapX = 4; + public int mMapY = 7; + + private Bitmap mMapchipUp; + private Bitmap mMapchipDown; + private Bitmap mMapchipUpKing; + private Bitmap mMapchipDownKing; + + public Player(Context context){ + mContext = context; + mName = ""; + this.initialize(); + } + + public Player(Context context, String name){ + mContext = context; + mName = name; + this.initialize(); + } + + public void setPoint(int x,int y){ + mMapX = x; + mMapY = y; + } + /* + * åæåå¦ç + */ + private void initialize(){ + Resources r=mContext.getResources(); + mMapchipUp = BitmapFactory.decodeResource(r,R.drawable.player); + mMapchipDown = BitmapFactory.decodeResource(r,R.drawable.player_back); + mMapchipUpKing = BitmapFactory.decodeResource(r,R.drawable.king); + mMapchipDownKing = BitmapFactory.decodeResource(r,R.drawable.king_back); + //èªè¨¼æ å ±åå¾ + mSettings = mContext.getSharedPreferences(Player.PREFS, Context.MODE_PRIVATE); + } + + /* + * ãã¬ã¤ã¤ã¼æç» + */ + public void draw(Canvas canvas, float scale, int mapLeft, int mapTop){ + int x = -1; + int y = -1; + + Bitmap mMapchip; + if (this.mCommanderClass.equals(GENERAL)) { + mMapchip = mMapchipDownKing; + } else { + mMapchip = mMapchipUp; + } + + mCurrentMapX = mapLeft; + mCurrentMapY = mapTop; + if(mapLeft <= mMapX && (mapLeft+15) >= mMapX){ + x = MapView.CHIP_W * (mMapX - mapLeft); + } + if(mapTop <= mMapY && (mapTop+15) >= mMapY){ + y = MapView.CHIP_H * (mMapY - mapTop); + } + + if(x >= 0 && y >= 0){ + Matrix matrix = new Matrix(); + float scaleX = (float)MapView.CHIP_W / (float)mMapchip.getWidth(); + float scaleY = (float)MapView.CHIP_H / (float)mMapchip.getHeight(); + matrix.setScale(scaleX, scaleY); + Bitmap tmp = Bitmap.createBitmap(mMapchip, 0, 0, mMapchip.getWidth(), mMapchip.getHeight(), matrix, true); + canvas.drawBitmap(tmp, x, y, null); + } + } + /* + * å ¨ä½å°å³ã«ãã¬ã¤ã¤ã¼æç» + */ + public void drawOnWholeMap(Canvas canvas, int w, int h){ + Paint paint = new Paint(); + if (mMySelf) { + paint.setColor(Color.RED); + } + else { + switch(mCountry) { + case GI: + if (mCommanderClass.equals(this.COMMANDER)) {// == "b") { + paint.setColor(Color.CYAN); + } + else if (this.mCommanderClass.equals(this.GENERAL)) {//s") { + paint.setColor(Color.CYAN); + } + else { + paint.setColor(Color.CYAN); + } + break; + case GO: + if (mCommanderClass.equals(this.COMMANDER)) {// == "b") { + paint.setColor(Color.YELLOW); + } + else if (this.mCommanderClass.equals(this.GENERAL)) {//=="s") { + paint.setColor(Color.YELLOW); + } + else { + paint.setColor(Color.YELLOW); + } + break; + case SYUKU: + if (mCommanderClass.equals(this.COMMANDER)) {// == "b") { + paint.setColor(Color.WHITE); + } + else if (this.mCommanderClass.equals(this.GENERAL)) {// =="s") { + paint.setColor(Color.WHITE); + } + else { + paint.setColor(Color.WHITE); + } + break; + } + } + + paint.setStyle(Style.FILL); + int x = mMapX * w; + int y = mMapY * h; + canvas.drawRect(x, y, x + w, y + h, paint); + } + + public int calcDrawArea(int p,int mCurrentMap) + { + if (mCurrentMap <= p && p <= (mCurrentMap+15)) + { + return p - mCurrentMap; + } + return -1; + } + + /* + * 移åå¯è½ç¯å²ã®æç» + */ + public void drawMovingArea(Canvas canvas){ + int leftX = calcDrawArea(mMapX-mMoveArea,mCurrentMapX); + int topY = calcDrawArea(mMapY-mMoveArea,mCurrentMapY); + int rightX = calcDrawArea(mMapX+1+mMoveArea+1,mCurrentMapX); + int bottomY = calcDrawArea(mMapY+1+mMoveArea+1,mCurrentMapY); + + if (leftX < 0 && rightX > 0) { + leftX = 0; + } + if (leftX > 0 && rightX < 0) { + rightX = 15; + } + if (topY < 0 && bottomY > 0) { + topY = 0; + } + if (topY > 0 && bottomY < 0) { + bottomY = 15; + } + + if (leftX >= 0 && topY >= 0 && rightX >= 0 && bottomY >= 0) { + int left = leftX * MapView.CHIP_W; + int top = topY * MapView.CHIP_H; + int right = rightX * MapView.CHIP_W; + int bottom = bottomY * MapView.CHIP_H; + + Paint paint = new Paint(); + paint.setColor(Color.RED); + paint.setAlpha(40); + paint.setStyle(Style.FILL); + canvas.drawRect(left, top, right, bottom, paint); + } + } + + /* + * ã¯ãªãã¯ãããå¦ã«èªåã®Playerãããããã§ãã¯ãã + */ + public boolean hitTest(float pointX, float pointY){ + int left = (mMapX - mCurrentMapX) * MapView.CHIP_W; + int top = (mMapY - mCurrentMapY) * MapView.CHIP_H; + int right = left + MapView.CHIP_W; + int bottom = top + MapView.CHIP_H; +/* + Log.d("hitTest","mMapX="+Integer.toString(mMapX)+"|mMapY="+Integer.toString(mMapY)); + Log.d("hitTest","pointX="+Float.toString(pointX)+"|left="+Integer.toString(left)+"|right="+Integer.toString(right)); + Log.d("hitTest","pointY="+Float.toString(pointY)+"|top="+Integer.toString(top)+"|bottom="+Integer.toString(bottom)); +*/ + if(left <= pointX && pointX <= right){ + if(top <= pointY && pointY <= bottom){ + return true; + } + } + return false; + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TweetArrayAdapter.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TweetArrayAdapter.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TweetArrayAdapter.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,91 @@ +package jp.or.cute.sangokushi.twitter; + +import java.util.List; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; +import android.widget.TextView; + + +public class TweetArrayAdapter extends ArrayAdapter<TweetItem> { + LayoutInflater mInflater; + List<TweetItem> mItems; + int mViewResourceId; + + public TweetArrayAdapter(Context context, int resource, + int textViewResourceId, TweetItem[] objects) { + super(context, resource, textViewResourceId, objects); + mInflater = LayoutInflater.from(context); + mViewResourceId = resource; + } + public TweetArrayAdapter(Context context, int resource, + int textViewResourceId) { + super(context, resource, textViewResourceId); + mInflater = LayoutInflater.from(context); + mViewResourceId = resource; + } + public TweetArrayAdapter(Context context, int textViewResourceId, + List<TweetItem> objects) { + super(context, textViewResourceId, objects); + mInflater = LayoutInflater.from(context); + mItems = objects; + mViewResourceId = textViewResourceId; + } + public TweetArrayAdapter(Context context, int textViewResourceId, + TweetItem[] objects) { + super(context, textViewResourceId, objects); + mInflater = LayoutInflater.from(context); + for (int i=1,j=0;i<objects.length;i++,j++) { + mItems.add(objects[i]); + } + mViewResourceId = textViewResourceId; + } + public TweetArrayAdapter(Context context, int textViewResourceId) { + super(context, textViewResourceId); + mInflater = LayoutInflater.from(context); + mViewResourceId = textViewResourceId; + } + public TweetArrayAdapter(Context context, int resource, int textViewResourceId, List<TweetItem> objects) { + super(context, resource, textViewResourceId, objects); + mInflater = LayoutInflater.from(context); + mItems = objects; + mViewResourceId = resource; + } + @Override + public View getView(int pos, View view, ViewGroup parent) { + String t; + ViewHolder holder; + if(view == null) { + view = mInflater.inflate(mViewResourceId, null); + view.setPadding( + view.getPaddingLeft(), + view.getPaddingTop()+5, + view.getPaddingRight(), + view.getPaddingBottom()+2); + holder = new ViewHolder(); + //holder.text1 = (TextView) view.findViewWithTag("tweet_name"); + holder.text2 = (TextView) view.findViewWithTag("tweet_tweet"); + view.setTag(holder); + } else { + holder = (ViewHolder) view.getTag(); + } + TweetItem item = this.getItem(pos); + //holder.text1.setText(item.getGameUserName() + ">>"); + holder.text2.setText(item.getTweet()); + return view; + } + + public String getTweet(int pos){ + TweetItem item = this.getItem(pos); + return item.getText(); + } + private class ViewHolder { + TextView text1; + TextView text2; + + } + +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TweetItem.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TweetItem.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TweetItem.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,107 @@ +package jp.or.cute.sangokushi.twitter; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import jp.or.cute.sangokushi.Battle; +import jp.or.cute.sangokushi.R; + +import org.json.JSONException; +import org.json.JSONObject; + +import android.app.Activity; +import android.content.Context; +import android.text.format.Time; + +public class TweetItem { + private Context mContext; + private TwitterJSON mJson; + + private JSONObject mStatus; + private JSONObject mUser; + private String mPlayerName; + + private String mTweet; + private String mHashTag; + + public TweetItem(Context context, TwitterJSON json, JSONObject status) throws JSONException{ + mContext = context; + mJson = json; + mStatus = status; + if(status.has("user")){ + mUser = status.getJSONObject("user"); + }else if(status.has("from_user")){ + mUser = new JSONObject(); + mUser.putOpt("name", status.get("from_user")); + } + mTweet = ""; + + if(mContext instanceof Battle){ + mHashTag = ((Battle)mContext).getHashTag(); + } + } + public String getCreatedAt() { + @SuppressWarnings("unused") + Time ret1 = new Time(); + String created_at = mStatus.optString("created_at", getString(R.string.bad_value)); + if(created_at != getString(R.string.bad_value)){ + Date date = new Date(Date.parse(mStatus.optString("created_at"))); + SimpleDateFormat stringFormat = new SimpleDateFormat("yyyy/MM/dd h:mm"); + created_at = stringFormat.format(date); + } + + return created_at; + } + + /* + * ãã¤ã¶ãããæ¬æãåå¾ + * ã²ã¼ã ç»é²ã¦ã¼ã¶ã¼åã¯[***]ã¨ãã¦æé ã«æ¸ãè¾¼ã¾ãã¦ããåæ<éä¿¡æã«èªåã§ä»ä¸ + * ããã·ã¥ã¿ã°ã¯åé¤<ææ«ã«ããã·ã¥ã¿ã°ãéä¿¡æã«èªåã§ä»ä¸ + */ + public String getText() { + String text = mJson.getCurrentTweet(mStatus); + Pattern pattern = Pattern.compile("^([[.*]])([.*])(#[.*])"); + Matcher matcher = pattern.matcher(text); + if(matcher.find()) { + mPlayerName = matcher.group(1); + mTweet = matcher.group(2); + }else{ + mPlayerName = getUserName(); + mTweet = text; + } + mTweet = mTweet.replace(mHashTag, ""); + return mTweet; + } + + public String getGameUserName(){ + if(mPlayerName == null || mPlayerName.length() == 0){ + getText(); + } + return mPlayerName; + } + public String getTweet(){ + if(mTweet == null || mTweet.length() == 0){ + getText(); + } + return mTweet; + } + public String getUserName() { + return mUser.optString("name", getString(R.string.bad_value)); + } + + private String getString(int resId){ + return mContext.getString(resId); + } + + /* + * ä¸è¡åã¨ãã¦æ´å½¢ + */ + public String getLine(){ + String text = getText(); + String line = mPlayerName + ">>" + mTweet; + + return line; + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterCredentialRunnable.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterCredentialRunnable.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterCredentialRunnable.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,61 @@ +package jp.or.cute.sangokushi.twitter; + +import java.io.IOException; + +import oauth.signpost.OAuthConsumer; +import oauth.signpost.exception.OAuthCommunicationException; +import oauth.signpost.exception.OAuthExpectationFailedException; +import oauth.signpost.exception.OAuthMessageSignerException; + +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.BasicResponseHandler; +import org.json.JSONException; +import org.json.JSONObject; + +import android.os.Handler; +import android.os.Message; + +/** + * Twitteréä¿¡ + * OAuthç¨éä¿¡ + * @author iST + * @version 0.1 + * @since 2010/03/29 + */ +public class TwitterCredentialRunnable extends TwitterRunnable{ + public TwitterCredentialRunnable(Handler handler, OAuthConsumer consumer) { + super(handler, consumer); + } + + @Override + public void run() { + JSONObject json = null; + OAuthConsumer consumer = this.getConsumer(); + + HttpGet get = new HttpGet(TwitterOperator.VERIFY_URL_STRING); + try { + consumer.sign(get); + String response = mClient.execute(get, new BasicResponseHandler()); + json = new JSONObject(response); + } catch (OAuthMessageSignerException e) { + e.printStackTrace(); + } catch (OAuthExpectationFailedException e) { + e.printStackTrace(); + } catch (OAuthCommunicationException e) { + e.printStackTrace(); + } catch (JSONException e) { + e.printStackTrace(); + } catch (ClientProtocolException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + Handler handler = this.getHandler(); + Message msg = new Message(); + msg.obj = json; + handler.sendMessage(msg); + + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterJSON.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterJSON.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterJSON.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,38 @@ +package jp.or.cute.sangokushi.twitter; + +import jp.or.cute.sangokushi.R; + +import org.json.JSONException; +import org.json.JSONObject; + +import android.content.Context; + + +public class TwitterJSON { + Context mContext; + + public TwitterJSON(Context context){ + mContext = context; + } + public String getCurrentTweet(JSONObject status) { + return status.optString("text", (String) getString(R.string.bad_value)); + } + + public String getUserName(JSONObject credentials) { + return credentials.optString("name", (String) getString(R.string.bad_value)); + } + + public String getLastTweet(JSONObject credentials) { + try { + JSONObject status = credentials.getJSONObject("status"); + return getCurrentTweet(status); + } catch (JSONException e) { + e.printStackTrace(); + return (String) getString(R.string.tweet_error); + } + } + + private CharSequence getString(int resId){ + return mContext.getText(resId); + } +} \ No newline at end of file Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterOAuth.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterOAuth.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterOAuth.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,156 @@ +package jp.or.cute.sangokushi.twitter; + +import jp.or.cute.sangokushi.Opening; +import junit.framework.Assert; +import oauth.signpost.OAuth; +import oauth.signpost.OAuthConsumer; +import oauth.signpost.OAuthProvider; +import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer; +import oauth.signpost.commonshttp.CommonsHttpOAuthProvider; +import oauth.signpost.exception.OAuthCommunicationException; +import oauth.signpost.exception.OAuthExpectationFailedException; +import oauth.signpost.exception.OAuthMessageSignerException; +import oauth.signpost.exception.OAuthNotAuthorizedException; +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.net.Uri; +import android.os.Bundle; + +/* + * Twitterã®OAuthèªè¨¼ + * Twitterèªè¨¼ç»é¢ã表示ãã¦ãèªè¨¼å¦çãã¦ã¼ã¶ã¼ã«æ±ãã + * èªè¨¼å¾ãOpeningç»é¢ã«é·ç§»ãã + * @author iST + * @version 0.1 + * @since 2010/03/29 + */ +public class TwitterOAuth extends Activity { + private OAuthConsumer mConsumer = null; + private OAuthProvider mProvider = null; + + SharedPreferences mSettings; + + private boolean mInitialOnResume = true; + + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + + mConsumer = new CommonsHttpOAuthConsumer( + TwitterOperator.TWITTER_CONSUMER_KEY, + TwitterOperator.TWITTER_CONSUMER_SECRET); + + mProvider = new CommonsHttpOAuthProvider ( + TwitterOperator.TWITTER_REQUEST_TOKEN_URL, + TwitterOperator.TWITTER_ACCESS_TOKEN_URL, + TwitterOperator.TWITTER_AUTHORIZE_URL); + + mProvider.setOAuth10a(true); + + mSettings = this.getSharedPreferences(TwitterOperator.PREFS, Context.MODE_PRIVATE); + + Intent i = this.getIntent(); + if (i.getData() == null) { + try { + String authUrl = mProvider.retrieveRequestToken(mConsumer, TwitterOperator.CALLBACK_URI.toString()); + saveRequestInformation(mSettings, mConsumer.getToken(), mConsumer.getTokenSecret()); + this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authUrl))); + } catch (OAuthMessageSignerException e) { + e.printStackTrace(); + } catch (OAuthNotAuthorizedException e) { + e.printStackTrace(); + } catch (OAuthExpectationFailedException e) { + e.printStackTrace(); + } catch (OAuthCommunicationException e) { + e.printStackTrace(); + } + } + } + + @Override + protected void onResume() { + super.onResume(); + + Uri uri = getIntent().getData(); + if (uri != null && TwitterOperator.CALLBACK_URI.getScheme().equals(uri.getScheme())) { + String token = mSettings.getString(TwitterOperator.REQUEST_TOKEN, null); + String secret = mSettings.getString(TwitterOperator.REQUEST_SECRET, null); + //Openingç»é¢ã«é·ç§» + Intent i = new Intent(this, Opening.class); + + try { + if(!(token == null || secret == null)) { + mConsumer.setTokenWithSecret(token, secret); + } + String otoken = uri.getQueryParameter(OAuth.OAUTH_TOKEN); + String verifier = uri.getQueryParameter(OAuth.OAUTH_VERIFIER); + + Assert.assertEquals(otoken, mConsumer.getToken()); + + mProvider.retrieveAccessToken(mConsumer, verifier); + token = mConsumer.getToken(); + secret = mConsumer.getTokenSecret(); + TwitterOAuth.saveAuthInformation(mSettings, token, secret); + TwitterOAuth.saveRequestInformation(mSettings, null, null); + i.putExtra(TwitterOperator.USER_TOKEN, token); + i.putExtra(TwitterOperator.USER_SECRET, secret); + setResult(RESULT_OK, i); + } catch (OAuthMessageSignerException e) { + e.printStackTrace(); + } catch (OAuthNotAuthorizedException e) { + e.printStackTrace(); + } catch (OAuthExpectationFailedException e) { + e.printStackTrace(); + } catch (OAuthCommunicationException e) { + e.printStackTrace(); + } finally { + startActivity(i); + finish(); +// finishActivity(Opening.RESULT_OAUTH); + } + }else if(mInitialOnResume){ + mInitialOnResume = false; + return; + } + //finish(); + //TwitterOAuth.this.finish(); + } + + public static void saveRequestInformation(SharedPreferences settings, String token, String secret) { + SharedPreferences.Editor editor = settings.edit(); + if(token == null) { + editor.remove(TwitterOperator.REQUEST_TOKEN); + } + else { + editor.putString(TwitterOperator.REQUEST_TOKEN, token); + } + if (secret == null) { + editor.remove(TwitterOperator.REQUEST_SECRET); + } + else { + editor.putString(TwitterOperator.REQUEST_SECRET, secret); + } + editor.commit(); + + } + + public static void saveAuthInformation(SharedPreferences settings, String token, String secret) { + SharedPreferences.Editor editor = settings.edit(); + if(token == null) { + editor.remove(TwitterOperator.USER_TOKEN); + } + else { + editor.putString(TwitterOperator.USER_TOKEN, token); + } + if (secret == null) { + editor.remove(TwitterOperator.USER_SECRET); + } + else { + editor.putString(TwitterOperator.USER_SECRET, secret); + } + editor.commit(); + + } + +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterOperator.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterOperator.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterOperator.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,141 @@ +package jp.or.cute.sangokushi.twitter; + +import java.io.IOException; +import java.util.LinkedList; + +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.BasicResponseHandler; +import org.apache.http.impl.client.DefaultHttpClient; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import oauth.signpost.OAuthConsumer; +import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer; +import oauth.signpost.exception.OAuthCommunicationException; +import oauth.signpost.exception.OAuthExpectationFailedException; +import oauth.signpost.exception.OAuthMessageSignerException; +import android.content.Context; +import android.content.SharedPreferences; +import android.net.Uri; +import android.os.AsyncTask; +import android.os.Handler; + +/** + * TweitterAPIã®æä½ + * @author iST + * @version 0.1 + * @since 2010/03/29 + */ +public class TwitterOperator { + //è¨å®æ å ±key + public static final String PREFS = "OpenSangokushiPrefsTwitterFile"; + public static final String USER_TWITTER_NAME = "twitter_name"; + public static final String USER_TWITTER_ID = "twitter_id"; + public static final String USER_TOKEN = "user_token"; + public static final String USER_SECRET = "user_secret"; + public static final String REQUEST_TOKEN = "request_token"; + public static final String REQUEST_SECRET = "request_secret"; + + //Twitterã¸ç»é²ããKEY + public static final String TWITTER_CONSUMER_KEY = "ehnSS1WfLByqyp1QjS3xhA"; + public static final String TWITTER_CONSUMER_SECRET = "BmAmAu5Pl0ZclcnJ6cweW3SptVL5gKwRWUqWwM9a4"; + + public static final Uri CALLBACK_URI = Uri.parse("twitter-oauth://sangokushi"); + + //TwitterAPIã®ã¢ãã¬ã¹ + public static final String TWITTER_REQUEST_TOKEN_URL = "http://twitter.com/oauth/request_token"; + public static final String TWITTER_ACCESS_TOKEN_URL = "http://twitter.com/oauth/access_token"; + public static final String TWITTER_AUTHORIZE_URL = "http://twitter.com/oauth/authorize"; + public static final String TWITTER_UPDATE_URL = "http://twitter.com/statuses/update.json"; + public static final String VERIFY_URL_STRING = "http://twitter.com/account/verify_credentials.json"; + public static final String PUBLIC_TIMELINE_URL_STRING = "http://twitter.com/statuses/public_timeline.json"; + public static final String USER_TIMELINE_URL_STRING = "http://twitter.com/statuses/user_timeline.json"; + public static final String HOME_TIMELINE_URL_STRING = "http://api.twitter.com/1/statuses/home_timeline.json"; + public static final String SEARCH_TIMELINE_URL_STRING = "http://search.twitter.com/search.json"; + public static final String FRIENDS_TIMELINE_URL_STRING = "http://api.twitter.com/1/statuses/friends_timeline.json"; + public static final String STATUSES_URL_STRING = "http://twitter.com/statuses/update.json"; + + public static final String DEFAULT_HASHTAG = "#osan"; + + //å¼ã³åºãå Activity + private Context mContext; + //è¨å®æ å ± + private SharedPreferences mSettings; + //OAuth + private OAuthConsumer mConsumer; + //Twitterèªè¨¼ãã¼ã¯ã³ + public String mToken; + //Twitterç§å¯ãã¼ + public String mSecret; + + //TwitterID + public String getTwitterID(){ + if(mSettings != null && mSettings.contains(USER_TWITTER_ID)){ + return mSettings.getString(USER_TWITTER_ID, null); + } + return null; + } + //TwitterToken + public String getTwitterToken(){ + if(mSettings != null && mSettings.contains(USER_TOKEN)){ + return mSettings.getString(USER_TOKEN, null); + } + return null; + } + //TwitterSecret + public String getTwitterSecret(){ + if(mSettings != null && mSettings.contains(USER_SECRET)){ + return mSettings.getString(USER_SECRET, null); + } + return null; + } + + public TwitterOperator(Context context){ + mContext = context; + + //èªè¨¼æ å ±åå¾ + mSettings = mContext.getSharedPreferences(TwitterOperator.PREFS, Context.MODE_PRIVATE); + //OAuthã³ã³ã·ã¥ã¼ãã¼ + mConsumer = new CommonsHttpOAuthConsumer( + TwitterOperator.TWITTER_CONSUMER_KEY, + TwitterOperator.TWITTER_CONSUMER_SECRET); + + setToken(); + + } + + /* + * è¨å®æ å ±ã«TOKENãããã°OAuthã³ã³ã·ã¥ã¼ãã¼ã«ç»é² + */ + private void setToken(){ + // ä¿åæ¸ã®èªè¨¼æ å ±ã®ç¢ºèª + if(mSettings.contains(USER_TOKEN) && mSettings.contains(USER_SECRET)) { + mToken = mSettings.getString(USER_TOKEN, null); + mSecret = mSettings.getString(USER_SECRET, null); + if(!(mToken == null || mSecret == null)) { + mConsumer.setTokenWithSecret(mToken, mSecret); + } + } + } + + /* + * Twitterã¸å¥ã¹ã¬ããã§è³æ ¼æ å ±ãç¢ºèª + */ + public void asyncGetCredential(Handler handler){ + TwitterCredentialRunnable runnable = new TwitterCredentialRunnable(handler, mConsumer); + new Thread(runnable).start(); + } + +// /* +// * ããã·ã¥ã¿ã°ãæ¤ç´¢ +// */ +// public void GetHashTagTimeline(String hashTag, TweetArrayAdapter taa, LinkedList<TweetItem> lists){ +// mAA = taa; +// mChatTweetLists = lists; +// HashTagSelector hs = new HashTagSelector(SEARCH_TIMELINE_URL_STRING, hashTag); +// new GetHashTagTimelineTask().execute(hs); +// } + +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterRunnable.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterRunnable.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterRunnable.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,48 @@ +package jp.or.cute.sangokushi.twitter; + +import oauth.signpost.OAuthConsumer; + +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.params.HttpConnectionParams; +import org.apache.http.params.HttpParams; + +import android.os.Handler; + +/** + * Twitteréä¿¡ + * @author iST + * @version 0.1 + * @since 2010/03/29 + */ +public class TwitterRunnable implements Runnable{ + private static final int CONNECTION_TIMEOUT = 10000; + private static final int TIMEOUT = 20000; + + private Handler mHandler; + public Handler getHandler() { + return mHandler; + } + + private OAuthConsumer mConsumer; + public OAuthConsumer getConsumer() { + return mConsumer; + } + + private HttpParams mHttpParams; + + protected DefaultHttpClient mClient; + + public TwitterRunnable(Handler handler, OAuthConsumer consumer){ + mHandler = handler; + mConsumer = consumer; + mClient = new DefaultHttpClient(); + + mHttpParams = mClient.getParams(); + HttpConnectionParams.setConnectionTimeout(mHttpParams, CONNECTION_TIMEOUT); //æ¥ç¶ã®ã¿ã¤ã ã¢ã¦ã + HttpConnectionParams.setSoTimeout(mHttpParams, TIMEOUT); //ãã¼ã¿åå¾ã®ã¿ã¤ã ã¢ã¦ã + } + + @Override + public void run() { + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterUserStatusRunnable.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterUserStatusRunnable.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/twitter/TwitterUserStatusRunnable.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,61 @@ +package jp.or.cute.sangokushi.twitter; + +import java.io.IOException; + +import oauth.signpost.OAuthConsumer; +import oauth.signpost.exception.OAuthCommunicationException; +import oauth.signpost.exception.OAuthExpectationFailedException; +import oauth.signpost.exception.OAuthMessageSignerException; + +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.BasicResponseHandler; +import org.json.JSONException; +import org.json.JSONObject; + +import android.os.Handler; +import android.os.Message; + +/** + * Twitteréä¿¡ + * ã¦ã¼ã¶ã¼æ å ±åå¾ç¨éä¿¡ + * @author iST + * @version 0.1 + * @since 2010/03/29 + */ +public class TwitterUserStatusRunnable extends TwitterRunnable{ + public TwitterUserStatusRunnable(Handler handler, OAuthConsumer consumer) { + super(handler, consumer); + } + + @Override + public void run() { + JSONObject jso = null; + OAuthConsumer consumer = this.getConsumer(); + + HttpGet get = new HttpGet(TwitterOperator.VERIFY_URL_STRING); + try { + consumer.sign(get); + String response = mClient.execute(get, new BasicResponseHandler()); + jso = new JSONObject(response); + } catch (OAuthMessageSignerException e) { + e.printStackTrace(); + } catch (OAuthExpectationFailedException e) { + e.printStackTrace(); + } catch (OAuthCommunicationException e) { + e.printStackTrace(); + } catch (JSONException e) { + e.printStackTrace(); + } catch (ClientProtocolException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + Handler handler = this.getHandler(); + Message msg = new Message(); + msg.obj = jso; + handler.sendMessage(msg); + + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/ChatPopupWindow.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/ChatPopupWindow.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/ChatPopupWindow.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,66 @@ +package jp.or.cute.sangokushi.view; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; +import android.widget.PopupWindow; + +public class ChatPopupWindow extends PopupWindow { + private ChatView mParentView; + + public ChatPopupWindow() { + super(); + // TODO Auto-generated constructor stub + } + + public ChatPopupWindow(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + // TODO Auto-generated constructor stub + } + + public ChatPopupWindow(Context context, AttributeSet attrs) { + super(context, attrs); + // TODO Auto-generated constructor stub + } + + public ChatPopupWindow(Context context) { + super(context); + // TODO Auto-generated constructor stub + } + + public ChatPopupWindow(int width, int height) { + super(width, height); + // TODO Auto-generated constructor stub + } + + public ChatPopupWindow(View contentView, int width, int height, + boolean focusable) { + super(contentView, width, height, focusable); + // TODO Auto-generated constructor stub + } + + public ChatPopupWindow(View contentView, int width, int height) { + super(contentView, width, height); + // TODO Auto-generated constructor stub + } + + public ChatPopupWindow(View contentView) { + super(contentView); + // TODO Auto-generated constructor stub + } + + @Override + public void showAsDropDown(View anchor, int xoff, int yoff) { + super.showAsDropDown(anchor, xoff, yoff); + } + + @Override + public void showAsDropDown(View anchor) { + super.showAsDropDown(anchor); + } + + @Override + public void showAtLocation(View parent, int gravity, int x, int y) { + super.showAtLocation(parent, gravity, x, y); + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/ChatView.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/ChatView.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/ChatView.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,184 @@ +package jp.or.cute.sangokushi.view; + +import java.util.LinkedList; + +import jp.or.cute.sangokushi.Battle; +import jp.or.cute.sangokushi.R; +import jp.or.cute.sangokushi.twitter.TweetArrayAdapter; +import jp.or.cute.sangokushi.twitter.TweetItem; +import jp.or.cute.sangokushi.twitter.TwitterOperator; +import android.app.Activity; +import android.content.Context; +import android.os.Handler; +import android.os.Message; +import android.util.AttributeSet; +import android.view.MotionEvent; +import android.view.View; +import android.view.View.OnClickListener; +import android.view.ViewGroup.LayoutParams; +import android.view.inputmethod.InputMethodManager; +import android.widget.Button; +import android.widget.EditText; +import android.widget.LinearLayout; +import android.widget.ListView; +import android.widget.TextView; + +public class ChatView extends TextView implements OnClickListener{ + //TwitterAPIå¶å¾¡ + private TwitterOperator mOperator; + //ããã·ã¥ã¿ã° + private String mChatTag; + + public String getChatTag() { + return mChatTag; + } + + private ListView mTweetList; + + public ListView getTweetList() { + return mTweetList; + } + + private EditText mTweetEditor; + public EditText getTweetEditor(){ + return mTweetEditor; + } + private Button mSendButton; + + private ChatPopupWindow mPopupWindow; + private Activity mActivity; + + public ChatView(Context context) { + super(context); + // TODO Auto-generated constructor stub + } + + public ChatView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + // TODO Auto-generated constructor stub + } + + public ChatView(Context context, AttributeSet attrs) { + super(context, attrs); + // TODO Auto-generated constructor stub + } + + public void init(Activity activity, String room_id, String country_id){ + mActivity = activity; + mChatTag = "#osan" + room_id + country_id; + + mPopupWindow = createPopUpWindow(); + + setOnClickListener(this); +// final ListView tweetlist = (ListView) findViewById(R.id.TweetListView); +// mArrayAdapter = new TweetArrayAdapter(mActivity, R.layout.list); +// tweetlist.setAdapter(mArrayAdapter); +// tweetlist.setSelection(0); + + mOperator = new TwitterOperator(mActivity); + if(mOperator.getTwitterToken() == null){ + this.setText(R.string.twitter_notauth_message); + return; + } + //Twitterã¡ãã»ã¼ã¸åå¾ + loadTweets(mChatTag); + } + + /* + * ãã£ããç¨ãããã¢ãããã¥ã¼ã®ä½æ + */ + private ChatPopupWindow createPopUpWindow() { + LinearLayout tv = (LinearLayout) mActivity.getLayoutInflater().inflate( + R.layout.popup, null); + + ChatPopupWindow popupWindow = new ChatPopupWindow(mActivity); + popupWindow.setWindowLayoutMode(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); + popupWindow.setContentView(tv); + + if(mTweetList == null){ + mTweetList = (ListView) popupWindow.getContentView().findViewById(R.id.TweetListView); + } + + if(mTweetEditor == null){ + mTweetEditor = (EditText) popupWindow.getContentView().findViewById(R.id.EditText01); + } + + if(mSendButton == null){ + mSendButton = (Button) popupWindow.getContentView().findViewById(R.id.Button01); + } + mSendButton.setOnClickListener(this); + mTweetEditor.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + showInputMethod(); + } + }); + mTweetEditor.setOnFocusChangeListener(new OnFocusChangeListener() { + @Override + public void onFocusChange(View v, boolean hasFocus) { + if(hasFocus){ + showInputMethod(); + } + } + }); + mTweetEditor.setOnTouchListener(new OnTouchListener() { + @Override + public boolean onTouch(View v, MotionEvent event) { + showInputMethod(); + return false; + } + }); + + return popupWindow; + } + + + @Override + public void onClick(View v) { + if(v.equals(mSendButton)){ + //Tweetéä¿¡ + sendTweet(mChatTag); + }else if(v.equals(this)){ + if(mPopupWindow.isShowing()) { + mPopupWindow.dismiss(); + } else { + if(mOperator == null){ + mOperator = new TwitterOperator(mActivity); + } + if(mOperator.getTwitterToken() == null){ + mOperator.asyncGetCredential(((Battle)mActivity).getTwitterAuthenticateHandler()); + return; + } + + //Twitterã¡ãã»ã¼ã¸åå¾ + loadTweets(mChatTag); + + //mPopUpText.setText("Click!"); + mPopupWindow.showAsDropDown(this,0,0); + + mTweetEditor.setFocusable(true); + } + } + } + + public void loadTweets(String hashtag){ + ((Battle)mActivity).loadTweets(hashtag); + } + + public void sendTweet(String hashtag){ + ((Battle)mActivity).sendTweet(hashtag); + } + Handler mTweetEditorHandler; + private void showInputMethod(){ + mTweetEditorHandler = new Handler(); + Message m = Message.obtain(mTweetEditorHandler, new Runnable() { + @Override + public void run() { + InputMethodManager manager = (InputMethodManager)mActivity.getSystemService(Activity.INPUT_METHOD_SERVICE); + manager.showSoftInput(mTweetEditor, InputMethodManager.SHOW_IMPLICIT); + } + }); + mTweetEditorHandler.sendMessage(m); + + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/MapStaticView.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/MapStaticView.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/MapStaticView.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,247 @@ +package jp.or.cute.sangokushi.view; + +import android.content.Context; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Paint; +import android.graphics.Paint.Style; +import android.util.AttributeSet; +import android.view.MotionEvent; +import android.view.View; + +public class MapStaticView extends View{ + private Paint mPaintBg; + private Paint mPaint; + private Paint mPaintStroke; + + /* + * ããããã¼ã¿ + 1=å±± + 2=æ + 3=èå° + 4=ç å° + 5=å· + 6=æ¹ + 7=åoré£ + 8=è¡é + */ + private int[][] map; + private int[] colors; + + private int mMapSpeed = 5; + private boolean mTouch = false; + private float mTouchX = -1; + private float mTouchY = -1; + + private int mCenterX = 0; + private int mCenterY = 0; + + int w = 24; + int h = 24; + + public MapStaticView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + init(); + } + + public MapStaticView(Context context, AttributeSet attrs) { + super(context, attrs); + init(); + } + + public MapStaticView(Context context) { + super(context); + init(); + } + + private void init(){ +// this.setLayoutParams( +// new android.view.ViewGroup.LayoutParams(w*100,h*100)); + + int[] _colors = { + Color.argb(255, 0, 128, 0), + Color.argb(255, 0, 128, 0), + Color.argb(255, 238, 91, 0), + Color.argb(255, 238, 91, 0), + Color.argb(255, 0, 255, 255), + Color.argb(255, 0, 255, 255), + Color.argb(255, 255, 255, 0), + Color.argb(255, 255, 255, 0) + }; + colors = _colors; + //ããã + map = createDummyMap(); + + mPaintBg = new Paint(); + mPaintBg.setColor(Color.BLACK); + mPaint = new Paint(); + mPaint.setStyle(Style.FILL); + mPaintStroke = new Paint(); + mPaintStroke.setStyle(Style.STROKE); + mPaintStroke.setColor(Color.BLACK); + + //ãã©ã¼ã«ã¹ + setFocusable(true); + setFocusableInTouchMode(true); + + mCenterX = getWidth() / 2; + mCenterY = getHeight() / 2; + mTouchX = mCenterX; + mTouchY = mCenterY; + } + + boolean mDrawed = false; + @Override + protected void onDraw(Canvas canvas) { + super.onDraw(canvas); + if(!mDrawed){ + doDraw(canvas); + mDrawed = true; + } + } + + private void doDraw(Canvas canvas){ + int m = 1; + int x = 0; + int y = 0; + + canvas.drawRect(0, 0, getWidth(), getHeight(), mPaintBg); + for(int i = 0; i < 100; i++){ + for(int j = 0; j < 100; j++){ + x = i * w; + y = j * h; + m = map[i][j]-1; + mPaint.setColor(colors[m]); + canvas.drawRect(x, y, x + w, y + h, mPaint); + canvas.drawRect(x, y, x + w, y + h, mPaintStroke); + mPaintStroke.setTextSize(10); + canvas.drawText(String.valueOf(i)+","+String.valueOf(j), x, y, mPaintStroke); + } + } + } + + + @Override + public boolean onTouchEvent(MotionEvent event) { + int touchAction = event.getAction(); + mCenterX = getWidth() / 2; + mCenterY = getHeight() / 2; + if(touchAction == MotionEvent.ACTION_DOWN){ + // 2éã§ã¤ãã³ããå¦çãã¦ãããã +/* mTouch = true; + mTouchX = event.getX(); + mTouchY = event.getY();*/ + //this.scrollTo((int)mTouchX-mCenterX, (int)mTouchY-mCenterY); + }else if(touchAction == MotionEvent.ACTION_UP || + touchAction == MotionEvent.ACTION_CANCEL){ + mTouch = false; + } + return super.onTouchEvent(event); + } + + private int[][] createDummyMap(){ + int[][] _map_iryou = { + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3}, + {5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3}, + {1,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3}, + {1,1,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,8,8}, + {1,1,1,1,1,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,3}, + {1,1,1,1,1,5,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,3,3}, + {1,1,1,1,1,1,1,1,1,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,8,8,8,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,8,8,8,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,1,1,1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,8,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,1,1,1,1,1,1,1,1,5,5,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,8,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,1,1,1,1,1,5,5,5,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,8,1,1,4,4,4,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,1,1,1,5,5,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,8,8,1,4,4,4,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,1,1,5,1,1,1,1,1,1,1,1,1,1,5,5,1,1,1,1,1,1,1,1,1,1,1,1,8,1,4,4,4,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,5,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,1,8,1,4,4,4,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,8,8,8,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,1,4,4,4,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,8,8,4,4,4,1,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5,1,1,1,1,1,8,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,5,1,1,8,1,4,4,3,3,3,3,3,3,3,3,3,8,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,8,1,4,4,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,8,8,1,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,8,3,3,3,3,3,3,3,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,1,1,1,8,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,3,8,8,3,3,3,3,3,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,3,3,3,8,8,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5,3,3,3,3,8,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,5,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,5,3,3,3,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,5,5,3,8,8,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,5,3,8,3,3,3,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,5,8,8,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,8,3,3,3,3,3,8,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,8,8,5,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,8,3,5,5,3,3,3,3,3,3,3,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,8,8,8,3,3,5,5,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,8,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,8,8,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,8,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,8,8,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,8,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,3,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,8,8,1,1,8,8,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,8,8,1,8,8,8,8,1,1,1,1,1,1,1,1,1,1,1,1,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,8,8,1,1,1,1,1,1,1,8,8,8,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,3,3,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,8,1,1,8,8,8,8,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,3,3,3,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,8,8,8,8,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,8,8,8,8,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,8,8,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,6,6,6,3,3,8,8,8,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,6,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,6,6,3,3,3,3,8,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,6,6,6,1,1,6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1,1,6,6,6,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,8}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,6,1,1,1,6,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,3,5,5,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,1,1,1,1,1,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,3,3,3,3,3,3,5,5,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,5,5,5,5,5,3,3,3,3,3,3,3,3,3,5,5}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,5,5,3,3,3,5,5,5,3,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,5,5,3,3,5,5,3,5,5,3,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,5,5,5,5,5,3,3,3,5,5,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3,5,3,3,3,3,3,3,3,3,3}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,3,3,3,3,5,5,3,3,3,3,3,3,3,3,5,5,3,3,3,3,3,3,3,3} + }; + return _map_iryou; + } +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/MapView.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/MapView.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/MapView.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,684 @@ +package jp.or.cute.sangokushi.view; + +import java.util.Random; + +import jp.or.cute.sangokushi.R; +import jp.or.cute.sangokushi.SangokushiPreferences; +import jp.or.cute.sangokushi.Lobby.battle_Status; +import jp.or.cute.sangokushi.dummy.DummyMapData; +import jp.or.cute.sangokushi.httpclient.BattleCommand; +import jp.or.cute.sangokushi.httpclient.BattleResultCommand; +import jp.or.cute.sangokushi.httpclient.HttpClient; +import jp.or.cute.sangokushi.httpclient.HttpCommand; +import jp.or.cute.sangokushi.httpclient.LobbyInfoCommand; +import jp.or.cute.sangokushi.httpclient.RoomInfoCommand; +import jp.or.cute.sangokushi.model.Player; +import android.app.Activity; +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Paint; +import android.graphics.Paint.Style; +import android.os.Handler; +import android.os.Message; +import android.os.SystemClock; +import android.util.AttributeSet; +import android.util.Log; +import android.view.GestureDetector; +import android.view.KeyEvent; +import android.view.MotionEvent; +import android.view.View; +import android.widget.TextView; + +public class MapView extends View implements GestureDetector.OnGestureListener, + GestureDetector.OnDoubleTapListener{ + private Paint mPaintBg; + private Paint mPaint; + private Paint mPaintStroke; + private GestureDetector mGestureDetector; + private Activity activity; + private MapView me; + private WholeMapView mWholeMap; + + + public static final int CHIP_W = 32; + public static final int CHIP_H = 32; + private static int SHOW_PRESS = 1; + private static int LONG_PRESS = 2; + private static int DOUBLE_TAP = 3; + private static int DOUBLE_TAP_EVENT = 4; + private static int SINGLE_TAP_CONFIRMED = 5; + private static int SINGLE_TAP_EVENT = 6; + + private static int EVENT_CANCEL = -1; + private static String b01002_prev = ""; + public static String mUserName = ""; + + private float mScale = 1; + + /* + * ããããã¼ã¿ + 1=å±± + 2=æ + 3=èå° + 4=ç å° + 5=å· + 6=æ¹ + 7=åoré£ + 8=è¡é + */ + private int[][] map; + private Bitmap[] mapchips = new Bitmap[8]; + + private float mTouchX = -1; + private float mTouchY = -1; + + private int mCenterX = 0; + private int mCenterY = 0; + + private int mMoveX = 0; + private int mMoveY = 0; + private int mCurrentX = 0; + private int mCurrentY = 0; + private int mCurrentMapX = 0; + private int mCurrentMapY = 0; +// private boolean mFirstDraw = true; + private boolean mPlayerMovingFlag = false; + + // + private int mEvent = EVENT_CANCEL; + //ã²ã¼ã ãã¬ã¤ã¤ã¼ + private Player mPlayer; + private Player[] mPlayers; + + // + private String mUserid; + private String mRoomid; + + private BattleCommand battleCommand; // = new BattleCommand(); + + //å ¨ä½å°å³ç¨ãã³ãã©ã¼ + private Handler mWholeMapViewHandler; + private Message mWholeMapViewMessage; + + /* + * Key Event + * by kumazaku 2010/7/31 + */ + public boolean onKeyDown(int keyCode, KeyEvent event) { + Log.d("MapView","onKeyDown code:"+keyCode); + // if (keyCode == KeyEvent.KEYCODE_MENU) { + // AlertDialog.Builder builder = new AlertDialog.Builder(activity); + // builder.setMessage("Helpã表示ãã¾ããï¼") + // .setCancelable(false) + // .setPositiveButton("Yes", new DialogInterface.OnClickListener() { + // public void onClick(DialogInterface dialog, int id) { + + // } + // }) + // .setNegativeButton("No", new DialogInterface.OnClickListener() { + // public void onClick(DialogInterface dialog, int id) { + // dialog.cancel(); + // } + // }); + // AlertDialog alert = builder.create(); + // alert.show(); + // return true; + // } + return false; + } + + public MapView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + init(context); + } + + public MapView(Context context, AttributeSet attrs) { + super(context, attrs); + init(context); + } + + public MapView(Context context) { + super(context); + init(context); + } + + private void init(Context context){ + me = this; + //ãããããã + Resources r=context.getResources(); + //1=å±± + mapchips[0] = BitmapFactory.decodeResource(r,R.drawable.forest); + //2=æ + mapchips[1] = BitmapFactory.decodeResource(r,R.drawable.tree); + //3=èå° + mapchips[2] = BitmapFactory.decodeResource(r,R.drawable.grass); + //4=ç å° + mapchips[3] = BitmapFactory.decodeResource(r,R.drawable.desert); + //5=å· + mapchips[4] = BitmapFactory.decodeResource(r,R.drawable.water); + //6=æ¹ + mapchips[5] = BitmapFactory.decodeResource(r,R.drawable.water); + //7=åoré£ + mapchips[6] = BitmapFactory.decodeResource(r,R.drawable.castle); + //8=è¡é + mapchips[7] = BitmapFactory.decodeResource(r,R.drawable.street); + + //ããã + map = DummyMapData.createDummyMap(); + + mPaintBg = new Paint(); + mPaintBg.setColor(Color.BLACK); + mPaint = new Paint(); + mPaint.setStyle(Style.FILL); + mPaintStroke = new Paint(); + mPaintStroke.setStyle(Style.STROKE); + mPaintStroke.setColor(Color.BLACK); + mPaintStroke.setStrokeWidth(0); + + this.setClickable(true); + + //ãã©ã¼ã«ã¹ + setFocusable(true); + setFocusableInTouchMode(true); + +// mHolder = getHolder(); +// mHolder.addCallback(this); +// mHolder.setFixedSize(getWidth(), getHeight()); + + mCenterX = getWidth() / 2; + mCenterY = getHeight() / 2; + mTouchX = mCenterX; + mTouchY = mCenterY; + + //this.battleCommand = new BattleCommand(mUserid,mRoomid); + this.mGestureDetector = new GestureDetector(context, this); + } + + public void setUserAndRoom(String user,String room) + { + //this.battleCommand.setUserAndRoom(user,room); + mUserid = user; + mRoomid = room; + Log.d("MapView","UserID="+mUserid+"|mRoomid="+mRoomid); + } + + /* + * ã²ã¼ã ãã¬ã¤ã¤ã¼ãã»ãã + */ + public void setPlayer(Player player){ + mPlayer = player; + } + + /* + * ã²ã¼ã ãã¬ã¤ã¤ã¼ãã»ãã + */ + public void setPlayers(Player[] players){ + mPlayers = players; + } +/* + public String getLobbyPlayers() + { + return battleCommand.httpPost("data=B01002"); + } +*/ + public void setContent(Activity act) + { + this.activity = act; + } + /* + * å ¨ä½å°å³ãã»ãã + */ + public void setWholeMapViewHandler(Handler handler){ + mWholeMapViewHandler = handler; + } + + @Override + protected void onDraw(Canvas canvas) { + super.onDraw(canvas); + //Log.d("MapView","onDraw"); + //Log.d("MapView","mTouchX="+Float.toString(mTouchX)+"|mTouchY="+Float.toString(mTouchY)); + drawMapBitmap(canvas, mMoveX, mMoveY); + mTouchX = -1; + mTouchY = -1; + } + + private void drawMapBitmap(Canvas canvas, int moveX, int moveY){ + int col = 15; + int row = 15; + //Log.d("MapView","drawMapBitmap"); + //Log.d("drawMapBitmap","mCurrentMapX="+Integer.toString(mCurrentMapX)+"|mCurrentMapY="+Integer.toString(mCurrentMapY)); + int m = 1; + int x = 0; + int y = 0; + int currentMapX = mCurrentMapX; + int currentMapY = mCurrentMapY; + if(mScale == 0.0f){ + mScale = (float)getWidth() / 480f; + } + + if (mTouchX >= 0) { + mCurrentMapX = currentMapX + (int) Math.round(mTouchX / (CHIP_W * mScale)) - col/2; + mCurrentMapY = currentMapY + (int) Math.round(mTouchY / (CHIP_H * mScale)) - row/2; + } + if(mCurrentMapX < 0){ + mCurrentMapX = 0; + }else if(mCurrentMapX > (map.length-col)){ + mCurrentMapX = (map.length-col); + } + if(mCurrentMapY < 0){ + mCurrentMapY = 0; + }else if(mCurrentMapY > (map.length-row)){ + mCurrentMapY = (map.length-row); + } + + canvas.drawRect(0, 0, getWidth(), getHeight(), mPaintBg); + + for(int i = mCurrentMapX; i < mCurrentMapX+col; i++){ + for(int j = mCurrentMapY; j < mCurrentMapY+row; j++){ + x = (int) ((i-mCurrentMapX) * CHIP_W * mScale); + y = (int) ((j-mCurrentMapY) * CHIP_H * mScale); + m = map[i][j]-1; + if(mScale != 1.0f){ + canvas.drawBitmap( + Bitmap.createBitmap(mapchips[m], 0, 0, (int)(CHIP_W*mScale), (int)(CHIP_H*mScale)), + x, y, mPaint); + canvas.drawRect(x, y, x+(int)(CHIP_W*mScale), y+(int)(CHIP_H*mScale), mPaintStroke); + }else{ + canvas.drawBitmap(mapchips[m], x, y, mPaint); + canvas.drawRect(x, y, x+CHIP_W, y+CHIP_H, mPaintStroke); + } + } + } + if (mPlayers != null) { + for (int i=0;i<mPlayers.length;i++) { + mPlayers[i].draw(canvas, mScale, mCurrentMapX ,mCurrentMapY); + } + } + + if(mPlayer != null){ + mPlayer.draw(canvas, mScale, mCurrentMapX ,mCurrentMapY); + if (mPlayerMovingFlag) { + mPlayer.drawMovingArea(canvas); + } + } + + if(mWholeMapViewHandler != null){ + //å ¨ä½å³ã¸åæ + mWholeMapViewMessage = new Message(); + int[] params = {mCurrentMapX,mCurrentMapY}; + mWholeMapViewMessage.obj = params; + mWholeMapViewHandler.sendMessage(mWholeMapViewMessage); + } + + mPaintStroke.setTextSize(16); + canvas.drawText(String.valueOf(mCurrentX)+","+String.valueOf(mCurrentY), 15, 15, mPaintStroke); + mPaintStroke.setTextSize(16); + canvas.drawText(String.valueOf(mCurrentMapX)+","+String.valueOf(mCurrentMapY), 15, 30, mPaintStroke); + + } + + + @Override + public boolean onTouchEvent(MotionEvent event) { + // Activityã®ã¿ããã¤ãã³ãä¸ã§GestureDetectorã®ã¤ãã³ããå¼ã³åºã + // é·æ¼ããããã«ã¿ããçã¯GestureDetectorå ã§å¤å®ããã¦ã + // GestureDetectorã«ç»é²ãããªã¹ãã¼(ãã®ã¯ã©ã¹)ã«å¦çãæ¯ãåãããã + // ifæã§æ»ãå¤ãå¤å®ãããã¨ã§ãGestureDetectorã§å¦çããå¾ã + // é常ã®onTouchEventããã®ã¾ã¾ç¶ç¶ãããã©ãããé¸æã§ãã + if(mGestureDetector.onTouchEvent(event)) return true; + + int touchAction = event.getAction(); +// Log.d("Touch Event","mTouchX="+Float.toString(mTouchX)+"|mTouchY="+Float.toString(mTouchY)+ +// "|Action="+Integer.toString(touchAction)+"|mEvent="+Integer.toString(mEvent)); + if(touchAction == MotionEvent.ACTION_DOWN){ + //Log.d("Touch Event","Down"); + }else if(touchAction == MotionEvent.ACTION_MOVE){ + }else if(touchAction == MotionEvent.ACTION_UP || + touchAction == MotionEvent.ACTION_CANCEL){ + mEvent = EVENT_CANCEL; + //Log.d("Touch Event","Cancel"); + } + return super.onTouchEvent(event); + } + + @Override + public boolean onDown(MotionEvent arg0) { + Log.d("Touch Event","onDown"); + return false; + } + + @Override + public boolean onFling(MotionEvent arg0, MotionEvent arg1, float arg2, float arg3) { + // TODO Auto-generated method stub + Log.d("Touch Event","onFling"); + return false; + } + + @Override + public void onLongPress(MotionEvent arg0) { + // TODO Auto-generated method stub + Log.d("Touch Event","onLongPress"); + mTouchX = -1; + mTouchY = -1; + areaStatus(arg0.getX(), arg0.getY()); + mEvent = LONG_PRESS; + this.invalidate(); + } + + @Override + public boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2, float arg3) { + // TODO Auto-generated method stub + return false; + } + + @Override + public void onShowPress(MotionEvent e) { + // TODO Auto-generated method stub + Log.d("Touch Event","onShowPress"); + mEvent = SHOW_PRESS; +/* mTouchX = e.getX(); + mTouchY = e.getY(); + this.invalidate(); + Log.d("Touch Event","mTouchX="+Float.toString(mTouchX)+"|mTouchY="+Float.toString(mTouchY)); + mPlayerMovingFlag = false; +*/ } + + @Override + public boolean onSingleTapUp(MotionEvent e) { + // TODO Auto-generated method stub + Log.d("Touch Event","onSingleTapUp"); + //mPlayerMovingFlag = false; + return false; + } + + @Override + public boolean onDoubleTap(MotionEvent arg0) { + // TODO Auto-generated method stub + Log.d("Touch Event","onDoubleTap"); + mEvent = DOUBLE_TAP; + return false; + } + + @Override + public boolean onDoubleTapEvent(MotionEvent arg0) { + // TODO Auto-generated method stub + Log.d("Touch Event","onDoubleTapEvent"); + Log.d("Touch Event","X="+Float.toString(arg0.getX())+"|Y="+Float.toString(arg0.getY())); + mEvent = DOUBLE_TAP_EVENT; + return false; + } + + @Override + public boolean onSingleTapConfirmed(MotionEvent arg0) { + // TODO Auto-generated method stub + Log.d("Touch Event","onSingleTapConfirmed"); + Log.d("Touch Event","mTouchX="+Float.toString(mTouchX)+"|mTouchY="+Float.toString(mTouchY)); + if (mPlayerMovingFlag) { + Float x = arg0.getX(); + Float y = arg0.getY(); + int cellX = (int)(x / MapView.CHIP_W) + mCurrentMapX; + int cellY = (int)(y / MapView.CHIP_H) + mCurrentMapY; + //Log.d("Move", "move=("+Float.toString(x)+","+Float.toString(y)+")"); + //Log.d("Move", "move=("+Integer.toString(cellX)+","+Integer.toString(cellY)+")"); +// battleCommand.MoveCell(cellX, cellY); + + SangokushiPreferences pref = new SangokushiPreferences(activity); + BattleCommand command = new BattleCommand(HttpCommand.POST, pref.getSessionID()); + command.setUserAndRoom(mUserid, mRoomid); + command.MoveCell(cellX,cellY); + //Log.d("MapView","mUserid="+mUserid+"|mRoomid="+mRoomid); + HttpClient httpclient = HttpClient.getInstance(); + httpclient.setHttpCommand(command); + String result = (String) httpclient.execute(); + //Log.d("player move","result=\""+result+"\""); + this.invalidate(); + mPlayerMovingFlag = false; + } else { + mEvent = SINGLE_TAP_EVENT; + mTouchX = arg0.getX(); + mTouchY = arg0.getY(); + boolean ret = areaStatus(arg0.getX(), arg0.getY()); + if (ret) { + Float x = arg0.getX(); + Float y = arg0.getY(); + int cellX = (int)(x / MapView.CHIP_W) + mCurrentMapX; + int cellY = (int)(y / MapView.CHIP_H) + mCurrentMapY; + Log.d("Move", "move=("+Float.toString(x)+","+Float.toString(y)+")"); + Log.d("Move", "move=("+Integer.toString(cellX)+","+Integer.toString(cellY)+")"); +// battleCommand.MoveCell(cellX, cellY); + + SangokushiPreferences pref = new SangokushiPreferences(activity); + BattleCommand command = new BattleCommand(HttpCommand.POST, pref.getSessionID()); + command.setUserAndRoom(mUserid, mRoomid); + command.BattlePlayer(cellX,cellY); + //Log.d("MapView","mUserid="+mUserid+"|mRoomid="+mRoomid); + HttpClient httpclient = HttpClient.getInstance(); + httpclient.setHttpCommand(command); + String result = (String) httpclient.execute(); + //Log.d("player move","result=\""+result+"\""); + + } + this.invalidate(); + mPlayerMovingFlag = false; + } + //mEvent = SINGLE_TAP_CONFIRMED; + return false; + } + + /* + * æå®åº§æ¨ä¸ã«ã®ç¶æ ãå¤å®ãå¿ è¦ãªå¦çãè¡ã + */ + private boolean areaStatus(float x, float y){ + boolean ret = false; + //ãã¬ã¤ã¤ã¼ + if(mPlayer.hitTest(x, y)){ + //移åå¯è½ç¯å²è¡¨ç¤º + mPlayerMovingFlag = true; + } + else { + for (int i=0;i<mPlayers.length;i++) { + if (mPlayers[i].hitTest(x,y)) { + if (mPlayers[i].getMySelf()) { + mPlayerMovingFlag = true; + } else { + Log.d("areaStatus","Name="+mPlayers[i].getName()+"|Country="+mPlayers[i].getCountry()); + //String text = mPlayers[i].getName() + " å µå:" + Integer.toString(mPlayers[i].getPower()); + AlertDialog.Builder dlg; + dlg = new AlertDialog.Builder(this.getContext()); + dlg.setTitle(mPlayers[i].getName()); + String msg = "æå±:" + mPlayers[i].getCountryName(); + msg += "\néç´:" + mPlayers[i].getCommanderClass(); + msg += "\nå µå:" + Integer.toString(mPlayers[i].getPower()); + dlg.setMessage(msg); + DialogInterface.OnClickListener listner = new DialogInterface.OnClickListener(){ + @Override + public void onClick(DialogInterface dialog, int which) { + //Log.d("Button",Integer.toString(which)); + activity.setResult(Activity.RESULT_OK); + } + }; + + dlg.setNegativeButton("OK", listner); + dlg.show(); + if (mPlayer.getCountryID() != mPlayers[i].getCountryID()) { + int en_x = mPlayers[i].mMapX; + int en_y = mPlayers[i].mMapY; + int me_x = mPlayer.mMapX; + int me_y = mPlayer.mMapY; + if (((me_x-1) <= en_x && en_x <= (me_x+1)) && + ((me_y-1) <= en_y && en_y <= (me_y+1))) { + ret = true; + } + } + } + break; + } + } + } + return ret; + } + + public void setWholeMapView(WholeMapView mWholeMapView) + { + mWholeMap = mWholeMapView; + } + + private boolean noWriteFlag = false; + + public Player[] makePlayers(String msg) { + noWriteFlag = false; + String[] pInfo = msg.split(">>"); + //Log.d("makePlayers","size="+Integer.toString(pInfo.length)); + Player[] players = new Player[pInfo.length-1]; + //Log.d("makePlayers","players size="+Integer.toString(players.length)); + for (int i=1,j=0;i<pInfo.length;i++,j++) { + if (i==1) { + // æ¦éã@ã®å ´å㯠+ if (pInfo[i].startsWith("@")) { + noWriteFlag = true; + break; + } + } + int top = 0; + String[] pValue = pInfo[i].split(","); + //Log.d("makePlayers","["+pValue[0]+"]["+pValue[1]+"]["+pValue[2]+"]["+pValue[3]+"]["+pValue[4]+"]"); + //Log.d("makePlayers","Call setInfo i="+Integer.toString(i)+"|j="+Integer.toString(j)); + players[j] = new Player(this.activity,pValue[top+1]); + int cell = Integer.parseInt(pValue[top+3]); + int power = Integer.parseInt(pValue[top+4]); + players[j].setInfo(power, 0, pValue[top+0], Integer.parseInt(pValue[top+2])-1, cell); + if (players[j].getName().equals(mUserName)) { + players[j].setMySelf(); + setPlayer(players[j]); + // player = players[i]; + } + } + return players; + } + + private boolean reWrite = false; + public Player[] getPlayerInfo() + { + reWrite = false; + SangokushiPreferences pref = new SangokushiPreferences(activity); + BattleResultCommand command = new BattleResultCommand(HttpCommand.POST, pref.getSessionID(),this.mRoomid); + HttpClient httpclient = HttpClient.getInstance(); + httpclient.setHttpCommand(command); + String playerInfo = (String) httpclient.execute(); + if (playerInfo != this.b01002_prev) { + reWrite = true; + } + this.b01002_prev = playerInfo; + Log.d("Battle","playerInfo="+playerInfo); +// String playerInfo = map.getLobbyPlayers(); + Player[] players = makePlayers(playerInfo); + return players; + } + + private int mCurrentTurn=0; + private int mMaxTurn = 60; + public void getRoomInfo() + { + SangokushiPreferences pref = new SangokushiPreferences(activity); + RoomInfoCommand command = new RoomInfoCommand(HttpCommand.POST, pref.getSessionID(), this.mRoomid); + HttpClient httpclient = HttpClient.getInstance(); + httpclient.setHttpCommand(command); + + String result = (String) httpclient.execute(); + Log.d("getRoomInfo","rsult="+result); + String[] param = result.split(">>"); + String[] value = param[1].split(","); + if (mCurrentTurn != Integer.valueOf(value[1])) { + int maxTurn = Integer.valueOf(value[0]); + int currentTurn = Integer.valueOf(value[1]); + if (currentTurn != mCurrentTurn) { + mCurrentTurn = currentTurn; + int diffTurn = mMaxTurn - mCurrentTurn; +/* TextView currentTurnView = (TextView) findViewById(R.id.TextView03); + currentTurnView.setText(Integer.toString(mCurrentTurn)+"æ¥ç®"); + TextView diffTurnView = (TextView) findViewById(R.id.TextView01); + currentTurnView.setText("æ®ã"+Integer.toString(diffTurn)+"æ¥"); +*/ } + } + } + + private static final int INVALIDATE = 1; + private Player[] players; + + private final Handler mHandler = new Handler() { + @Override + public void handleMessage(Message msg) { + Log.d("handleMessage","mCurrentTurn="+Integer.toString(mCurrentTurn)+"|mMaxTurn="+Integer.toString(mMaxTurn)); + if (mCurrentTurn != mMaxTurn) { + // 表示 + TextView currentTurnView = (TextView) activity.findViewById(R.id.TextView03); + currentTurnView.setText(Integer.toString(mCurrentTurn)+"æ¥ç®"); + int diffTurn = mMaxTurn - mCurrentTurn; + TextView diffTurnView = (TextView) activity.findViewById(R.id.TextView01); + diffTurnView.setText("æ®ã"+Integer.toString(diffTurn)+"æ¥"); + if (mAnimate && msg.what == INVALIDATE) { + players = getPlayerInfo(); + getRoomInfo(); + me.invalidate(); + if (mCurrentTurn == mMaxTurn) { + AlertDialog.Builder dlg; + dlg = new AlertDialog.Builder(me.getContext()); + dlg.setTitle("æ¦éçµäº"); + String mg = "ãã®æ¦ãã¯çµäºãã¾ãã"; + dlg.setMessage(mg); + DialogInterface.OnClickListener listner = new DialogInterface.OnClickListener(){ + @Override + public void onClick(DialogInterface dialog, int which) { + //Log.d("Button",Integer.toString(which)); + activity.setResult(Activity.RESULT_OK); + } + }; + + dlg.setNegativeButton("OK", listner); + dlg.show(); + } + if (!noWriteFlag && reWrite) { + mWholeMap.setPlayers(players); + setPlayers(players); + me.invalidate(); + } + msg = obtainMessage(INVALIDATE); + long current = SystemClock.uptimeMillis(); + if (mNextTime < current) { + // 100mså¨æã§ã¿ã¤ãã¼ã¤ãã³ããçºç + mNextTime = current + 10000; + } + sendMessageAtTime(msg, mNextTime); + // 100mså¨æã§ã¿ã¤ãã¼ã¤ãã³ããçºç + mNextTime += 10000; + } + } + } + }; + /** + * Windowã«Attachãããæã®å¦ç + */ + protected void onAttachedToWindow(){ + mAnimate = true; + Message msg = mHandler.obtainMessage(INVALIDATE); + mNextTime = SystemClock.uptimeMillis(); + mHandler.sendMessageAtTime(msg, mNextTime); + super.onAttachedToWindow(); + } + + /** + * WindowããDetachãããæã®å¦ç + */ + protected void onDetachedFromWindow() { + mAnimate = false; + super.onDetachedFromWindow(); + } + private boolean mAnimate; + private long mNextTime; +} Added: tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/WholeMapView.java =================================================================== --- tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/WholeMapView.java (rev 0) +++ tags/Ver.0.1.5/OpenSangokushi/src/jp/or/cute/sangokushi/view/WholeMapView.java 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,134 @@ +package jp.or.cute.sangokushi.view; + +import jp.or.cute.sangokushi.dummy.DummyMapData; +import jp.or.cute.sangokushi.model.Player; +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Paint; +import android.graphics.Paint.Style; +import android.util.AttributeSet; +import android.util.Log; +import android.view.View; + +public class WholeMapView extends View{ + int w = 2; + int h = 2; + private int[][] map; + private int[] colors; + + //詳細å°å³ã®è¡¨ç¤ºç¯å² + private int mAreaX; + private int mAreaY; + + private Bitmap mMap; + + private boolean mFirstDraw = false; + /* + * 詳細å°å³ã®è¡¨ç¤ºç¯å²ãã»ãããã¦åæç» + */ + public void drawArea(int x, int y){ + mAreaX = x; + mAreaY = y; + this.invalidate(); + } + //ã²ã¼ã ãã¬ã¤ã¤ã¼ + private Player mPlayer; + private Player[] mPlayers; + + /* + * ã²ã¼ã ãã¬ã¤ã¤ã¼ãã»ãã + */ + public void setPlayer(Player player){ + mPlayer = player; + } + + /* + * ã²ã¼ã ãã¬ã¤ã¤ã¼ãã»ãã + */ + public void setPlayers(Player[] players){ + mPlayers = players; + } + + @Override + protected void onDraw(Canvas canvas) { + Paint paintBg = new Paint(); + paintBg.setColor(Color.BLACK); + Paint paint = new Paint(); + paint.setStyle(Style.FILL); + Paint paintStroke = new Paint(); + paintStroke.setStyle(Style.STROKE); + paintStroke.setColor(Color.BLACK); + paintStroke.setStrokeWidth(0); + + super.onDraw(canvas); + //ããã + if(map == null){ + map = DummyMapData.createDummyMap(); + } + //ãããã«ã©ã¼ + if(colors == null){ + colors = DummyMapData.getMapColors(); + } + int m = 1; + int x = 0; + int y = 0; + if(mMap == null){ + mMap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888); + Canvas mapCanvas = new Canvas(mMap); + mapCanvas.drawRect(0, 0, getWidth(), getHeight(), paintBg); + for(int i = 0; i < 60; i++){ + for(int j = 0; j < 60; j++){ + x = i * w; + y = j * h; + if((x >= 0 && x < getWidth()) && (y >= 0 && y < getHeight())){ + m = map[i][j]-1; + paint.setColor(colors[m]); + mapCanvas.drawRect(x, y, x + w, y + h, paint); + mapCanvas.drawRect(x, y, x + w, y + h, paintStroke); + } + } + } + } + canvas.drawBitmap(mMap, 0, 0,new Paint()); + mFirstDraw = true; + if (mPlayers != null) { + for (int i=0;i<mPlayers.length;i++) { + mPlayers[i].drawOnWholeMap(canvas, w,h); + } + } + /* + //ãã¬ã¤ã¤ã¼æç» + if(mPlayer != null){ + mPlayer.drawOnWholeMap(canvas, w, h); + } +*/ + + //詳細å°å³ã¨ãªã¢ + paintStroke.setColor(Color.RED); + canvas.drawRect(mAreaX*w, mAreaY*h, (mAreaX+15)*w, (mAreaY+15)*h, paintStroke); + } + + public void setMapData(int[][] mapdata){ + map = mapdata; + } + public void setMapColors(int[] colorsdata){ + colors = colorsdata; + } + public WholeMapView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + // TODO Auto-generated constructor stub + } + + public WholeMapView(Context context, AttributeSet attrs) { + super(context, attrs); + // TODO Auto-generated constructor stub + } + + public WholeMapView(Context context) { + super(context); + // TODO Auto-generated constructor stub + } + +} Added: tags/Ver.0.1.5/Server/DBä½ææé .txt =================================================================== --- tags/Ver.0.1.5/Server/DBä½ææé .txt (rev 0) +++ tags/Ver.0.1.5/Server/DBä½ææé .txt 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,30 @@ +âä¸å½å¿ãã¼ã¿ãã¼ã¹ä½ææé + + åæãã¼ã¿ãã¼ã¹ãä½æããæé ã§ã + ãµã¼ãã«MySQLãã¤ã³ã¹ãã¼ã«ããã¦ãããã¨ãåæã«ãªãã¾ãã(åæè¨å®æ¸ã¿) + åºæ¬çã«ã¯MySQLã«ãã°ã¤ã³ãã¦SQLãå®è¡ããdumpãããªã¹ãã¢ããã ãã§ãã + ãã¡ã¤ã«ã§å®è¡ã§ãªãã³ããã§å®è¡ãã¾ãã + +â åæãã¼ã¿ãã¼ã¹ä½æ + +mysql -u root -p + +ã»ãã¼ã¿ãã¼ã¹ä½æ +databaseSQL.txtãéãã¦ä¸ã®SQLãã³ãã¼ â ã³ã³ã½ã¼ã«ã«ãã¼ã¹ã â å®è¡ +(æ¹è¡ã³ã¼ããä¸ç·ã«ã³ãã¼ããã¨åæã«å®è¡ããã¾ãã) + +ã»ãã¼ã¿ãã¼ã¹ç¢ºèª +mysql>show databases; + +o_sangokushi ãã§ãã¦ãããã¨ãç¢ºèª + +ã»ãã¼ã¿ãã¼ã¹ã¦ã¼ã¶ä½æ(PHPã¦ã¼ã¶) +grantSQL.txtãéãã¦ä¸ã®SQLãã³ãã¼ â ã³ã³ã½ã¼ã«ã«ãã¼ã¹ã â å®è¡ +(æ¹è¡ã³ã¼ããä¸ç·ã«ã³ãã¼ããã¨åæã«å®è¡ããã¾ãã) + +ã»ãã¼ã¿ãã¼ã¹ã¦ã¼ã¶ç¢ºèª +mysql> SHOW GRANTS FOR 'phpuser'@'localhost'; +mysql> quit + +ã»ãã¹ã¿ã¼ãã¼ã¿æå ¥ +mysql -u root -pãã¹ã¯ã¼ã < dump.sql Added: tags/Ver.0.1.5/Server/Openä¸å½å¿ä½¿ç¨è¨±è«¾.txt =================================================================== --- tags/Ver.0.1.5/Server/Openä¸å½å¿ä½¿ç¨è¨±è«¾.txt (rev 0) +++ tags/Ver.0.1.5/Server/Openä¸å½å¿ä½¿ç¨è¨±è«¾.txt 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,480 @@ +######################################## + Openä¸å½å¿ã使ç¨è¨±è«¾ +######################################## + +Ver.1.00ã2010/05/27 +*** Openä¸å½å¿éçºããã¸ã§ã¯ããã¼ã *** + +### é©ç¨ã®ç¯å² ### +Openä¸å½å¿ã®ã½ã¼ã¹ããªã¼ã«åå¨ããå ¨ã¦ã®ã½ã¼ã¹ã³ã¼ãã»ããã¥ã¡ã³ã + +### æ¦è¦ ### + +Openä¸å½å¿ã®ä»æ§è¨±è«¾ã¯ããGNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ (GNU General Public License: GPLv3)ãã«åºã¥ãã©ã¤ã»ã³ã¹ããã¾ãã + +### æ¥æ¬èªè¨³ ### + +GNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ (GNU General Public License) +ãã¼ã¸ã§ã³3ã2007å¹´6æ29æ¥ +æ¥æ¬èªè¨³ã2007å¹´9æ5æ¥ +Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +(訳: æ¬ã©ã¤ã»ã³ã¹ææ¸ããä¸åä¸å¥å¿ å®ã«è¤è£½ãé å¸ãããã¨ã¯è¨±å¯ããããããå¤æ´ã¯èªããªãã) + +This is an unofficial translation of the GNU General Public License into Japanese. It was not published by the Free Software Foundation, and does not legally state the distribution terms for software that uses the GNU GPL--only the original English text of the GNU GPL does that. However, we hope that this translation will help Japanese speakers understand the GNU GPL better. + +(訳: 以ä¸ã¯GNU General Public Licenseã®éå ¬å¼ãªæ¥æ¬èªè¨³ã§ããããã¯ããªã¼ã½ããã¦ã§ã¢è²¡å£ (Free Software Foundation)ã«ãã£ã¦æ£å¼ã«çºè¡¨ããããã®ã§ã¯ãªããGNU GPLãé©ç¨ãããã½ããã¦ã§ã¢ã®é å¸æ¡ä»¶ãæ³çã«æå¹ãªå½¢ã§è¿°ã¹ããã®ã§ã¯ããã¾ãããé å¸æ¡ä»¶ã¨ãã¦ã¯ãGNU GPLã®è±èªçããã¹ãã§æå®ããã¦ãããã®ã®ã¿ãæå¹ã§ããããããªãããç§ãã¡ã¯ãã®ç¿»è¨³ããæ¥æ¬èªã使ç¨ãã人ã ã«ã¨ã£ã¦GNU GPLãããè¯ãç解ããå©ãã¨ãªããã¨ãæãã§ãã¾ãã) + +翻訳ã¯å «ç°çè¡ <mhatt****@gnu*****>ãè¡ã£ããåæã¯http://www.gnu.org/licenses/gpl-3.0.html ã§ããã誤訳ã®ææã訳ã®æ¹åæ¡ãæè¿ããããªããæ¥æ¬èªè¨³ã®å©ç¨æ¡ä»¶ã¯åæã«æºããã + +ã¯ããã« +GNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ã¯ãã½ããã¦ã§ã¢ããã®ä»ã®ç¨®é¡ã®èä½ç©ã®ããã®ãããªã¼ãã¤ã³ãã¼ã¬ããã主張ããã©ã¤ã»ã³ã¹ã§ãã + +ã½ããã¦ã§ã¢ããã®ä»ã®å®ç¨çèä½ç©åãã®ã©ã¤ã»ã³ã¹ã®å¤§åã¯ãããªãããèä½ç©ãå ±æãããå¤æ´ãããããèªç±ã奪ãå»ãããè¨è¨ããã¦ãã¾ãããããã¨ã¯å¯¾ç §çã«ãGNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ã¯ãããªãã«å¯¾ãã¦ããããã°ã©ã ã®å ¨ã¦ã®ãã¼ã¸ã§ã³ãå ±æãå¤æ´ããèªç±ãä¿è¨¼ãããã¨ãããªãã¡ããã®ã½ããã¦ã§ã¢ããã®ã¦ã¼ã¶ãã¹ã¦ã«ã¨ã£ã¦ããªã¼ã§ããã¤ã¥ãããã¨ãä¿è¨¼ãããã¨ãç®çã¨ãã¦ãã¾ããç§ãã¡ããªã¼ã½ããã¦ã§ã¢è²¡å£(Free Software Foundation)ã¯ãGNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ãç§ãã¡ã®ã½ããã¦ã§ã¢ã®å¤§åã«é©ç¨ãã¦ãã¾ãããã®ä½è ãç§ãã¡ã¨åæ§ã®æ¹æ³ã§å ¬éãããªãã°ãä»ã®ãããªãèä½ç©ã«ãé©ç¨ãããã¨ãå¯è½ã§ãããã¡ãããããªãã®ããã°ã©ã ã«ãé©ç¨ãããã¨ãã§ãã¾ãã + +ç§ãã¡ãããªã¼ã½ããã¦ã§ã¢ã«ã¤ãã¦èªãã¨ããç§ãã¡ã¯èªç±ã«ã¤ãã¦è¨åãã¦ããã®ã§ãã£ã¦ãä¾¡æ ¼ã¯åé¡ã«ãã¦ãã¾ãããç§ãã¡ãç¨æããä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ã®æ°ã ã¯ãããªã¼ã½ããã¦ã§ã¢ã®ã³ãã¼ãé å¸ãã(ããã¦å¸æã«ãã£ã¦ã¯é å¸ã«éãã¦ææ°æãè¦æ±ãã)èªç±ãããªãã«ä¿è¨¼ãã¹ãè¨è¨ããã¦ãã¾ããããªãã¡ãã½ã¼ã¹ã³ã¼ããåé ããããæãã°ãããæã«å ¥ããããã¨ãããã¨ãã½ããã¦ã§ã¢ãå¤æ´ãããã®ä¸é¨ãæ°ããªããªã¼ããã°ã©ã ã§å©ç¨ãããã¨ãã§ããã¨ãããã¨ãããã¦ãããããã¨ãå¯è½ã§ãããã¨ãããªããç¥ã£ã¦ããã¨ãããã¨ãä¿è¨¼ãããã®ã§ãã + +(訳注: GNU GPL以å¤ã®ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ã¨ãã¦ãGNU AGPLã¨GNU LGPLãç¨æããã¦ããã) + +ããªãã®æ¨©å©ãå®ããããç§ãã¡ã¯èª°ãä»äººãä¸è¨ã®ãããªããªãã®æ¨©å©ãå¦å®ãããã権å©ãæ¾æ£ããããã«æ±ãããã¨ãé²ãå¿ è¦ãããã¾ããããã§ãããªããã½ããã¦ã§ã¢ã®ã³ãã¼ãé å¸ãããæ¹å¤ãããããå ´åãããªãã«ã¯ãã種ã®è²¬ä»»ãçºçãã¾ããããã¯ãä»äººã®èªç±ãå°éããã¨ãã責任ã§ãã + +ãã¨ãã°ãæ¬è¨±è«¾æ¸ãé©ç¨ãããããã°ã©ã ã®ã³ãã¼ãããªããé å¸ããå ´åããããç¡æã§ãããã¨ææ°æãåãå ´åã§ãããã¨ãããªãã¯åé è ãã¡ã«ãããªãèªèº«ãåãåã£ãã®ã¨åãèªç±ã渡ããªããã°ãªãã¾ãããããªãã¯ãå½¼ããã¾ããã½ã¼ã¹ã³ã¼ããåé ãããå¾ã«å¾ããããã¨ãä¿è¨¼ããªããã°ãªãã¾ãããããã¦ããªãã¯ãå½¼ãã«æ¬è¨±è«¾æ¸ã®æ¡é ã示ããå½¼ãã®æ¨©å©ã«ã¤ãã¦å½¼ãã«ç¥ããããªããã°ãªãã¾ããã + +GNU GPLãå©ç¨ããéçºè ã¯ãããªãã®æ¨©å©ã2段éã®æé ãè¸ãã§å®ãã¾ãããã®æé ã¨ã¯ã(1) ã½ããã¦ã§ã¢ã«èä½æ¨©ã主張ãã(2) ããªãã«æ¬è¨±è«¾æ¸ãæ示ãã¦ãã½ããã¦ã§ã¢ãè¤è£½ãé å¸ãã¾ãã¯æ¹å¤ããæ³çãªè¨±å¯ãä¸ãããã¨ãããã®ã§ãã + +éçºè ãä½è ãå®ããããGPLã§ã¯ããã®ããªã¼ã½ããã¦ã§ã¢ã«ã¯ä½ã®ä¿è¨¼ããªãã¨ãããã¨ãæ確ã«èª¬æãã¦ãã¾ããã¦ã¼ã¶ã¨éçºè 両æ¹ã®ä¾¿å®ã®ããã GPLã§ã¯æ¹å¤ããããã¼ã¸ã§ã³ã«ã¯å¤æ´ãããæ¨ãå°ã¥ããããè¦æ±ãã¦ãããæ¹å¤ããããã¼ã¸ã§ã³ã®åé¡ãã誤ã£ã¦ä»¥åã®ãã¼ã¸ã§ã³ã®ä½è ã«å¸°ãããããã¨ããªãããã«ãã¦ãã¾ãã + +ä¸é¨ã®æ©å¨ã¯ããããã«åé²ãããã½ããã¦ã§ã¢ãæ¹å¤ããä¸ã§åã³ã¤ã³ã¹ãã¼ã«ããããå®è¡ãããããããã«å¿ è¦ãªã¢ã¯ã»ã¹ãã製é è ã«ã¯æå¦ããªãã«ãããããã¦ã¼ã¶ã«å¯¾ãã¦ã¯æå¦ããããè¨è¨ããã¦ãã¾ããããã¯ãã¦ã¼ã¶ãèªãã®æããã½ããã¦ã§ã¢ãå¤æ´ããèªç±ãå®ãã¨ããGPLã®ç®çã¨ã¯ãæ ¹æ¬çã«ç¸å®¹ãã¾ããããã®ãããªæè¡ã®æ¿«ç¨ã¯ãå¾ã ã«ãã¦å人使ç¨åãã®è£½åã®åéã§è¦ããããã®ã§ãããã¾ãã«ãã®ãããªåéãããããããæ £è¡ãæã容èªãããããã®ã¨ãªãã®ã§ããããã§ç§ãã¡ã¯ããã®ãã¼ã¸ã§ã³ã®GPLãããããã製åã«ããã¦ãã®ç¨®ã®æ £è¡ãç¦æ¢ããããã«è¨è¨ãã¾ãããããå種ã®åé¡ãä»ã®é åã«ã¾ã§ç¸å½ç¨åº¦åºãã£ã¦ããå ´åã«ã¯ãç§ãã¡ã¯ã¦ã¼ã¶ã®èªç±ãå®ãããã®ã«å¿ è¦ã¨ããã ã ããGPLã®å°æ¥ã®ãã¼ã¸ã§ã³ã«ããã¦ãã®è¦å®ãããããé åã«ãæ¡å¤§ãã¹ãæºåãæ´ãã¦ãã¾ãã + +æå¾ã«ããã¹ã¦ã®ããã°ã©ã ã¯ã½ããã¦ã§ã¢ç¹è¨±ã«ãã£ã¦çµ¶ãéãªãè ãããã¦ãã¾ãããããå½å®¶ã¯ãç¹è¨±ãæ±ç¨ã³ã³ãã¥ã¼ã¿ã«ãããã½ããã¦ã§ã¢ã®éçºã¨å©ç¨ãå¶éãããã¨ãèªããã¹ãã§ã¯ããã¾ããããããããããã£ããã¨ãèªãã¦ãã¾ã£ã¦ããå°åã«ããã¦ã¯ãç§ãã¡ã¯ãç¹è¨±ãããªã¼ãªããã°ã©ã ã«é©ç¨ãããå®è³ªçã«ããã°ã©ã ããããã©ã¤ã¨ã¿ãªã«ããã¦ãã¾ãã¨ããç¹å¥ãªè å¨ãé¿ãããã¨æãã¾ããããããäºæ ãé²ãããã«ãGPLã§ã¯ãããã°ã©ã ãéããªã¼ã¨ããããã«ç¹è¨±ã使ããã¨ã¯ã§ããªãã¨ãããã¨ãä¿è¨¼ãã¾ãã + +(訳注: æ¬è¨±è«¾æ¸ã§ããããã©ã¤ã¨ã¿ãª (proprietary)ãã¨ã¯ãã½ããã¦ã§ã¢ã®å©ç¨ãåé å¸ãæ¹å¤ãç¦æ¢ããã¦ãããã許å¯ãå¾ããã¨ãå¿ è¦ã¨ããã¦ãããããããã¯å³ããå¶éã課ãããã¦ãã¦èªç±ã«ãããããã¨ãäºå®ä¸ã§ããªããªã£ã¦ããç¶æ ã®ãã¨ãæãã詳ããã¯http://www.gnu.org/philosophy/categories.ja.html#ProprietarySoftware ããåç §ããã) + +è¤è£½ãé å¸ãæ¹å¤ã«é¢ããæ£ç¢ºãªå©ç¨æ¡ä»¶ã¯ä»¥ä¸ã§è¿°ã¹ã¦ããã¾ãã + +å©ç¨æ¡ä»¶ (TERMS AND CONDITIONS) +0. å®ç¾© +ãæ¬è¨±è«¾æ¸ã(The License)ã¨ã¯ãGNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ã®ãã¼ã¸ã§ã³3ãæãã + +ããã³ãã¼ã©ã¤ããã(Copyright)ã¨ã¯ãããããèä½æ¨©ã®ã¿ãªãããåå°ä½ãã¹ã¯ã®ãããªãã®ä»ã®ä½åã«é©ç¨ããããèä½æ¨©ã«é¡ä¼¼ããæ³ç権å©ããæå³ããã + +(訳注: ãã®è¦å®ã«ãããæ¬è¨±è«¾æ¸ã¯èä½æ¨©æ³ã§ä¿è·ããããããããèä½ç©ããããåºãç¯å²ãã«ãã¼ãããã¨ã«ãªãããã£ã¦ãã®è¨³ã®ã©ã¤ã»ã³ã¹æ¬æä¸ã«ããã¦ã¯ãwork(s)ã«ãèä½ç©ãã§ã¯ãªããä½åãã¨ãã訳èªãå®ã¦ããã¨ã«ããã) + +ããããã°ã©ã ãã(The Program)ã¨ã¯ãæ¬è¨±è«¾æ¸ã®ä¸ã§ã©ã¤ã»ã³ã¹ãããããã³ãã¼ã©ã¤ããã主張å¯è½ãªä½åãã¹ã¦ãæå³ãããåã ã®ã©ã¤ã»ã³ã·ã¼ã¯ãããªããã¨ãã¦è¡¨ç¾ããããã©ã¤ã»ã³ã·ã¼ã¯å人ã§ãçµç¹ã§ãæ§ããªãã + +ããä½åã®ãæ¹å¤ã(modify)ã¨ã¯ããã®ä½åã®å ¨ä½ãªããä¸é¨ãããã³ãã¼ã©ã¤ããã®è¨±å¯ãå¿ è¦ã¨ãããããªããæ¹ã§è¤è£½ãªããç¿»æ¡ãããã¨ãæå³ããããã ããå®å ¨ã«åä¸ãªã³ãã¼ãä½æããå ´åã¯é¤ããæ¹å¤ã®çµæåºæ¥ãä½åã¯ã以åã®ä½åã®ãæ¹å¤ããããã¼ã¸ã§ã³ã(modified version)ãã¾ãã¯ã以åã®ä½åããåºã«ããã(based on)ä½åã¨å¼ã°ããã + +ããä¿è·ãããä½åãã(covered work)ã¨ã¯ãæ¹å¤ããã¦ããªããããã°ã©ã ããããããã°ã©ã ããåºã«ããä½åã®ãããããæãã + +ããä½åã®ãæ®åã(propagate)ã¨ã¯ãã³ã³ãã¥ã¼ã¿ä¸ã§å®è¡ãããã¨ãã¾ãã¯ç§çãªã³ãã¼ãæ¹å¤ãããã¨ãé¤ããé©ç¨å¯è½ãªãã³ãã¼ã©ã¤ããæ³è¦ã®ä¸ã§è¨±å¯ç¡ãè¡ãã¨ã権å©ä¾µå®³ã¨ãã¦ãç´æ¥çããããã¯éæ¥çã«ããªãã責任ãåãããä½ããã®è¡çºãæå³ãããæ®åã«ã¯ãè¤è£½ãé å¸(æ¹å¤ã®æç¡ãåããªã)ãå ¬è¡ã¸ã®å©ç¨å¯è½åãå«ã¾ããã¾ãããã¤ãã®å½ã ã§ã¯ä»ã®æ´»åãå«ã¾ããå¯è½æ§ãããã + +ããä½åã®ãä¼éã(convey)ã¨ã¯ã第ä¸è ãã³ãã¼ãä½æãªããåé ããã®ãå¯è½ã¨ããæ®åè¡çºãã¹ã¦ãæå³ããããã ããã³ã³ãã¥ã¼ã¿ãããã¯ã¼ã¯è¶ãã«ã¦ã¼ã¶ã¨ããã¨ãããã ãã§ãã³ãã¼ã®è»¢éã¯ä¼´ããªãå ´åã¯ãä¼éã§ã¯ãªãã + +対話çãªã¦ã¼ã¶ã¤ã³ã¿ã¼ãã§ã¼ã¹ãããé©åãªæ³çåç¥ãã(Appropriate Legal Notices)ã表示ããã¨ããå ´åããã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¯ (1)é©åãªãã³ãã¼ã©ã¤ããåç¥ã表示ãã(2)ã¦ã¼ã¶ã«å¯¾ãã¦ããã®ä½åã«ã¯ä½ã®ä¿è¨¼ããªã(å¥éä¿è¨¼ãæä¾ããã¦ããå ´åã¯é¤ã)ã¨ãããã¨ãã©ã¤ã»ã³ã·ã¼ã¯ãã®ä½åãæ¬è¨±è«¾æ¸ã®ä¸ã§ä¼éã§ããã¨ãããã¨ãããã¦æ¬è¨±è«¾æ¸ã®ã³ãã¼ãè¦ãã«ã¯ã©ãããããããã¨ãããã¨ã便å©ãã¤é¡èã«è¦èªã§ãããããªæ©è½ãå«ããã®ã¨ãããããã¤ã³ã¿ã¼ãã§ã¼ã¹ããã¡ãã¥ã¼ã®ãããªã¦ã¼ã¶ã³ãã³ãããªãã·ã§ã³ã®ä¸è¦§ã表示ãããªãã°ããã®ä¸è¦§ä¸ã«ã¯ä¸è¨ã®åºæºãæºãããããªã¢ã¤ãã ãç®ç«ã¤ããã«å«ã¾ãã¦ããªããã°ãªããªãã + +1. ã½ã¼ã¹ã³ã¼ã +ããä½åã®ãã½ã¼ã¹ã³ã¼ãã(source code)ã¨ã¯ããã®ä½åã«æ¹å¤ãå ããã«å½ãã£ã¦å¥½ã¾ããã¨èããããå½¢å¼ã®ãã¨ã§ãããããªãã¸ã§ã¯ãã³ã¼ãã (object code)ã¨ã¯ãä½åãã¨ãããã½ã¼ã¹ã³ã¼ã以å¤ã®å½¢å¼ãã¹ã¦ãæå³ããã + +ãæ¨æºã¤ã³ã¿ã¼ãã§ã¼ã¹ã(Standard Interface)ã¨ã¯ãæ¨æºåå£ä½ã¨ãã¦èªç¥ãããçµç¹ã«ãã£ã¦å®ç¾©ãããå ¬å¼ãªæ¨æºããããç¹å®ã®ããã°ã©ãã³ã°è¨èªåãã«æå®ãããã¤ã³ã¿ã¼ãã§ã¼ã¹ã®å ´åã«ã¯ããã®è¨èªãå©ç¨ããéçºè ã®éã§åºã使ããã¦ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã®ãã¨ãæãã + +å®è¡å¯è½ãªä½åã®ããã·ã¹ãã ã©ã¤ãã©ãªãã(System Libraries)ã¨ã¯ã (a)ã主è¦ã³ã³ãã¼ãã³ãã(Major Component) ã®é å¸ç©ã«é常å«ã¾ãããããã®ä¸»è¦ã³ã³ãã¼ãã³ãã®ä¸é¨ã§ã¯ãªãããã¤(b)ä½åããã®ã主è¦ã³ã³ãã¼ãã³ããã¨ãã£ããã«å©ç¨ãããã¨ãå¯è½ã«ããããããã¯å ¬è¡ã«ã¨ã£ã¦ã½ã¼ã¹ã³ã¼ãå½¢å¼ã§å©ç¨å¯è½ãªå®è£ ãã²ã¨ã¤ã¯åå¨ããæ¨æºã¤ã³ã¿ã¼ãã§ã¼ã¹ãæä¾ããããã«ã®ã¿æ©è½ãããã®ãã¹ã¦ãæå³ããããã ããå ¨ä½ã¨ãã¦ã®ä½åãã®ãã®ã¯é¤ããããã§ããã主è¦ã³ã³ãã¼ãã³ããã¨ã¯ãå®è¡å¯è½ãªä½åããã®ä¸ã§å®è¡ãããããç¹å®ã®ãªãã¬ã¼ãã£ã³ã°ã·ã¹ãã (ãããã£ããã®ãå¿ è¦ãªãã°)ã®ä¸»è¦ã§ä¸å¯æ¬ ãªä¸é¨å(ã«ã¼ãã«ãã¦ã£ã³ãã¦ã·ã¹ãã ãªã©)ããããã¯ãã®ä½åãä½æããã®ã«ä½¿ãããã³ã³ãã¤ã©ãå® è¡ããã®ã«ä½¿ããããªãã¸ã§ã¯ãã³ã¼ãã¤ã³ã¿ããªã¿ãªã©ãæå³ããã + +ãªãã¸ã§ã¯ãã³ã¼ãå½¢å¼ã®ä½åã«ãã対å¿ããã½ã¼ã¹ãã(Corresponding Source)ã¨ã¯ããã®ä½åãçæãã¤ã³ã¹ãã¼ã«ã(å®è¡å¯è½ãªä½åã«é¢ãã¦ã¯)ãªãã¸ã§ã¯ãã³ã¼ããå®è¡ãã¾ãã¯ä½åãæ¹å¤ããä¸ã§å¿ è¦ã¨ãããã½ã¼ã¹ã³ã¼ãã®ãã¹ã¦ãæå³ããããã®å ´åãããããæ´»åãã³ã³ããã¼ã«ããããã®ã¹ã¯ãªããã¯ã対å¿ããã½ã¼ã¹ãã«å«ã¾ãããããã®ä½åã«ã¨ã£ã¦ã®ãã·ã¹ãã ã©ã¤ãã©ãªãããå ã»ã©åæããæ´»åãè¡ãä¸ã§æ¹å¤ããããã¨ãªãå©ç¨ããããã®ã®ä½åã®ä¸é¨ã§ã¯ãªããæ±ç¨ã®ãã¼ã«ãä¸è¬çã«å©ç¨å¯è½ãªããªã¼ããã°ã©ã ã¯é¤å¤ããããä¾ãã°ã対å¿ããã½ã¼ã¹ãã«ã¯ããã®ä½åã®ã½ã¼ã¹ãã¡ã¤ã«ã¨é£æºããã¤ã³ã¿ã¼ãã§ã¼ã¹å®ç¾©ãã¡ã¤ã«ã«å ããå ±æã©ã¤ãã©ãªãåçã«ãªã³ã¯ãããä¸ä½ããã°ã©ã ã¨ä½åã®ãã ®ä»ã®é¨åã¨ã®éã§ã®è¦ªå¯ãªãã¼ã¿ã®ããã¨ããã³ã³ããã¼ã«ããã¼ãªã©ã®ããã«ããã®ä½åãè¨è¨ä¸æ確ã«å¿ è¦ã¨ãããããããå ±æã©ã¤ãã©ãªãä¸ä½ããã°ã©ã ã®ã½ã¼ã¹ã³ã¼ããªã©ãå«ã¾ããã + +ã対å¿ããã½ã¼ã¹ãã«ã¯ãã¦ã¼ã¶ãã対å¿ããã½ã¼ã¹ãã®ä»ã®é¨åããèªåçã«åçæã§ãããã®ãå«ãå¿ è¦ã¯ãªãã + +ã½ã¼ã¹ã³ã¼ãå½¢å¼ã®ä½åã«ã¨ã£ã¦ã®ã対å¿ããã½ã¼ã¹ãã¨ã¯ããã®ä½åãã®ãã®ã§ããã + +2. åºæ¬çãªè¨±å¯ +æ¬è¨±è«¾æ¸ã®ä¸ã§èªãããããã¹ã¦ã®æ¨©å©ã¯ããããã°ã©ã ãã«ä¸»å¼µããããã³ãã¼ã©ã¤ããã®æ¡é ã«åºã¥ãæä¸ããããã®ã§ãããããã§è¿°ã¹ãããæ¡ä»¶ãæºãããã¦ããéãè¦ããã¨ã¯ã§ããªããæ¬è¨±è«¾æ¸ã¯ãæ¹å¤ããã¦ããªããããã°ã©ã ããããªããç¡å¶éã«å®è¡ãããã¨ã許å¯ããæ示çã«ç¢ºç´ããããä¿è·ãããä½åããå®è¡ãããã¨ããå¾ãããåºåçµæã¯ããã®åºåå 容ããä¿è·ãããä½åããæ§æããå ´åã®ã¿æ¬è¨±è«¾æ¸ã§ä¿è·ããããæ¬è¨±è«¾æ¸ã¯ãããªããæãããã§ã¢ã¦ã¼ã¹ã¾ãã¯ãã®åçç©ã®æ¨©å©ãããã³ãã¼ã©ã¤ããæ³è¦ã«ãã£ã¦æä¾ãããéãã«æ¿èªããã + +ãã®ä»ã®ç¶æ³ã«ããã¦ããªãã®ã©ã¤ã»ã³ã¹ãæå¹ã§ããéãããä¿è·ãããä½åãã®ãä¼éãä¼´ããªãä½æãå®è¡ãããã³æ®åã¯ç¡æ¡ä»¶ã«è¡ããã¨ãã§ãããä»è ã«ããªãå°ç¨ã®æ¹å¤ãè¡ãããããããã¯ä»è ã«ããªãããããã£ãä½åãå®è¡ããããã®æ©è½ãæä¾ãããã¨ãããã¨ãå¯ä¸ã®ç®çã§ããã°ããä¿è·ãããä½åããä»è ã«ä¼éãããã¨ãã§ããããã ããã®å ´åãããªãããã³ãã¼ã©ã¤ãããæ¯é ãã¦ããªãé¨åãã¹ã¦ã®ä¼éã«é¢ãã¦ã¯ãæ¬è¨±è«¾æ¸ã®æ¡é ã«å¾ããªããã°ãªããªããå¾ã£ã¦ãããªãã®ããã«ãä¿è·ãããä½åããä½æã¾ãã¯å®è¡ããè ã¯ãå°ãããªãã®ããã ãã«ãããªãã®ç£ç£ã¨æ¯é ã®ä¸ã§ãããªãã¨ã®é¢ä¿ã®ç¯å²å¤ã§ã¯ããªãããã³ãã¼ã©ã¤ãããæããä¸é¨åã®ãããªãã³ãã¼ããä½æãããã¨ã ç¦æ¢ããã¨ããæ¡ä»¶ã®ä¸ã§è¡ããªããã°ãªããªãã¨ãããã¨ã«ãªãã + +ä¸è¨ä»¥å¤ã®ããããç¶æ³ä¸ã«ããã¦ã¯ãä¼éã¯ä»¥ä¸ã§è¿°ã¹ãæ¡ä»¶ã®ä¸ã§ã®ã¿è¨±å¯ããããå許諾ã¯èªããããªããä¸è¨ç¬¬10é ã«ãããå許諾ã¯å¿ è¦ãªãããã§ããã + +3. ã¦ã¼ã¶ã®æ³ç権å©ããæè¡çä¿è·æ段ã®åé¿ãç¦ããæ³å¾ããå®ã +ãä¿è·ãããä½åãã¯ã 1996å¹´12æ20æ¥ã«æ¡æãããWIPOèä½æ¨©æ¡ç´ç¬¬11é ã®ä¸ã§ã®ç¾©åãæºããé©ç¨å¯è½ãªæ³ã®ããããããããã¯ããã«é¡ä¼¼ã®æ³ããåé¿ã®ç¦æ¢ã¾ãã¯å¶éã®å¯¾è±¡ã¨ãã¦è¦å®ããããå¹æçãªæè¡çæ段ã (effective technological measure)ã®ä¸é¨ã¨ãã¦è¦ãªããã¦ã¯ãªããªãã + +(訳注: WIPOèä½æ¨©æ¡ç´ã«ã¤ãã¦ã¯ãhttp://www.cric.or.jp/db/article/wch.html çãåç §ããã) + +ããªãããä¿è·ãããä½åããä¼éããå ´åããä¿è·ãããä½åãã«é¢ãã¦æ¬è¨±è«¾æ¸ã®ä¸ã§æ¨©å©ãè¡ä½¿ãããã¨ã«ãããæè¡çæ段ã®åé¿ã«å½±é¿ãåºãç¯å²ã«ããã¦ããã®ãããªæ段ã®åé¿ãç¦ãããããªãæ³ç権åããæ¾æ£ãããã¨ã«ãªããã¾ããããªãã¯ãã®ä½åã®ã¦ã¼ã¶ã«å¯¾ãã¦ãæè¡çæ段ã®åé¿ãç¦ããããã«ããªãã第ä¸è ã®æ³ç権å©ãå¼·å¶ããããã®æ段ã¨ãã¦ããã®ä½åã®åä½ãæ¹å¤ãå¶éãããããªãæå³ãå¦èªãããã¨ã«ãªãã + +4. ä¸åä¸å¥å¿ å®ãªã³ãã¼ã®ä¼é +ããªãã¯ãèªåãåé ãããããã°ã©ã ãã®ã½ã¼ã¹ã³ã¼ãã¨ä¸åä¸å¥åãã³ãã¼ã§ããã°ããããªãåªä½ã§ãä¼éãããã¨ãã§ããããã ããã®å ´åãããªãã¯ããããã®ã³ãã¼ã«ããã¦ãç®ç«ã¤ããã«ããã¤é©åãªå½¢ã§ããµãããããã³ãã¼ã©ã¤ããåç¥ãæ²è¼ããªããã°ãªããªããããªãã¡ãæ¬è¨±è«¾æ¸ã¨ãä¸è¨ç¬¬7é ã«å¾ã追å ãããé許å¯çæ¡é ã®ãã¹ã¦ããã®ã³ã¼ãã«é©ç¨ãããæ¨ã®åç¥ãæ²è¼ããããããä¿è¨¼ãåå¨ããªãæ¨ã®åç¥ããã¹ã¦ãã®ã¾ã¾ä¿å ¨ãããã¤ãããã°ã©ã ãã®åé è ãã¹ã¦ã«ããããã°ã©ã ãã¨ãã£ããã«ãã®è¨±è«¾æ¸ã®ã³ãã¼ãä¸ããªããã°ãªããªãã + +ããªãã¯ãèªåãä¼éããã³ãã¼ã®ããããã«é¢ãã¦ãããªãä¾¡æ ¼ãä»ãã¦ãè¯ãããç¡æã§ä¼éãã¦ãæ§ããªããã¾ããå ±é ¬ãåã£ã¦ãµãã¼ããä¿è¨¼ä¿è· (warranty protection)ãæä¾ãã¦ãè¯ãã + +5. æ¹å¤ããããã¼ã¸ã§ã³ã®ã½ã¼ã¹ã®ä¼é +ããªãã¯ããããã°ã©ã ããåºã«ããä½åããããã¯ããããä½åããããã°ã©ã ãããä½æããããã®æ¹å¤ç¹ããä¸è¨ç¬¬4é ã®è¦å®ã«å¾ã£ã¦ã½ã¼ã¹ã³ã¼ãå½¢å¼ã§ä¼éãããã¨ãã§ããããã ããã®å ´åãããªãã¯ä»¥ä¸ã«ç¤ºãæ¡ä»¶ã®ãã¹ã¦ãæºãããªããã°ãªããªã: + +a) ä½åã«ã¯ãããªããä½åãæ¹å¤ããã¨ãããã¨ã¨ãæ¹å¤ã«é¢é£ããæ¥æãè¨è¿°ããåç¥ãç®ç«ã¤ããã«è¼ããªããã°ãªããªãã +b) ä½åã«ã¯ããããæ¬è¨±è«¾æ¸ã¨ãä¸è¨ç¬¬7é ã«å¾ã£ã¦è¿½å ãããæ¡ä»¶ãã¹ã¦ã®ä¸ã§å ¬éããã¦ãããã¨ãè¨è¿°ããåç¥ãç®ç«ã¤ããã«è¼ããªããã°ãª ããªãããã®æ¡ä»¶ã¯ãä¸è¨ç¬¬4é ã«ããããåç¥ããã¹ã¦ãã®ã¾ã¾ä¿å ¨ãããããã®æ¡é ãæ¹å¤ããã +c) ä½åã®å ¨é¨åããç·ä½ã¨ãã¦ãã³ãã¼ãææããã«è³ã£ãäººå ¨å¡ã«ãæ¬è¨±è«¾æ¸ã®ä¸ã§ã©ã¤ã»ã³ã¹ããªããã°ãªããªããããã§ãæ¬è¨±è«¾æ¸ã¯ãæ¬è¨±è«¾ æ¸ç¬¬7é ã«åºã¥ãé©ç¨å¯è½ãªè¿½å çæ¡é ã®ãã¹ã¦ã¨ã¨ãã«ãä½åå ¨ä½ã«ãããªãã¡ãã®å ¨é¨åã«ãããããã©ã®ããã«ããã±ã¼ã¸ããã¦ãããã«é¢ããã é©ç¨ããããã¨ã«ãªããæ¬è¨±è«¾æ¸ã¯ããã以å¤ã®ããæ¹ã«ã¯ä½åãã©ã¤ã»ã³ã¹ãã許å¯ãä¸ããªãããããªããæ¬è¨±è«¾æ¸ä»¥å¤ã§å¥é許å¯ãå¾ã¦ããå ´å ã«ã¯ãããã«ãã£ã¦å¾ããã許å¯ã¾ã§ç¡å¹ã¨ãããã®ã§ã¯ãªãã +d) æ¹å¤ãããä½åã対話çãªã¦ã¼ã¶ã¤ã³ã¿ã¼ãã§ã¼ã¹ãæããå ´åããããã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¯ãé©åãªæ³çåç¥ãã表示ããªããã°ãªããªããã ã ãããããã°ã©ã ãã«å ã ãé©åãªæ³çåç¥ãã表示ããªã対話çãªã¤ã³ã¿ã¼ãã§ã¼ã¹ãããå ´åãããªãã®ä½åã§è¡¨ç¤ºããããã«ããå¿ è¦ã¯ãªãã +ä¸å·»ã®è¨æ¶è£ ç½®ã®ä¸ãé å¸åªä½ä¸ã§ããä¿è·ãããä½åãã¨ãæ¬æ¥ãä¿è·ãããä½åãã®æ¡å¼µã§ã¯ãªãããä¿è·ãããä½åãã¨ãã大è¦æ¨¡ãªããã°ã©ã ãå½¢æãããããªå½¢ã§çµåããã¦ããããã§ããªããã®ä»ã®åé¢ãã¤ç¬ç«ããä½åã¨ãã¾ã¨ããç·¨éç©ã¯ãç·¨éä½æ¥ã¨ããã«ç±æ¥ãããã³ãã¼ã©ã¤ããããåã ã®ä½åã許å¯ããç¯å²ãè¶ãã¦ç·¨éç©ã®ã¦ã¼ã¶ã®ä½åã¸ã®ã¢ã¯ã»ã¹ãæ³ç権å©ãå¶éããã®ã«ä½¿ãããªãéãããéç©ç©ã(aggregate)ã¨å¼ã°ãããåã«ãä¿è·ãããä½åããéç©ç©ã«å«ããã ãã§ã¯ããã®éç©ç©ã®ä»ã®é¨åã«ã¾ã§æ¬è¨±è«¾æ¸ãé©ç¨ãããã¨ãããã¨ã«ã¯ãªããªãã + +6. ã½ã¼ã¹ä»¥å¤ã®å½¢å¼ã«ãããä¼é +ããªãã¯ããªãã¸ã§ã¯ãã³ã¼ãå½¢å¼ã®ãä¿è·ãããèä½ç©ãããä¸è¨ç¬¬4é ããã³ç¬¬5é ã®è¦å®ã«å¾ã£ã¦ä¼éãããã¨ãã§ããããã ããã®å ´åãããªãã¯æ©æ¢°èªã¿åãå¯è½ãªã対å¿ããã½ã¼ã¹ããæ¬è¨±è«¾æ¸ã®æ¡ä»¶ã«å¾ã£ã¦ã以ä¸ã®ããããã®æ¹æ³ã§ä¼éããªããã°ãªããªãã + +a) ãªãã¸ã§ã¯ãã³ã¼ããç©çç製å(ç©ççé å¸åªä½ãå«ã)ã§ããããã¯ããã«çµã¿è¾¼ãã§ä¼éããããã®éãã対å¿ããã½ã¼ã¹ãããã½ããã¦ã§ã¢ ã®ããã¨ãã§ä¸è¬çã«ä½¿ãããèä¹ æ§ã®ããç©ççåªä½ã«åºå®ãã¦ãã£ããã«é å¸ããã +b) ãªãã¸ã§ã¯ãã³ã¼ããç©çç製å(ç©ççé å¸åªä½ãå«ã)ã§ããããã¯ããã«çµã¿è¾¼ãã§ä¼éããããã®éãæä½ã§ã3å¹´éããããã¯ããªããã㮠製åã¢ãã«ã«è£ä¿®ç¨é¨åãã«ã¹ã¿ãã¼ãµãã¼ããæä¾ããéãæå¹ãªãæ¸é¢ ã«ããç³ãåºãæ·»ä»ããããã®ç³ãåºã«ã¯ã(1) ãªãã¸ã§ã¯ãã³ã¼ããææããè ãã¹ã¦ã«å¯¾ãã¦ããã®è£½åã«å«ã¾ããã½ããã¦ã§ã¢ã®ãã¡æ¬è¨±è«¾æ¸ã§ä¿è·ããããã®ãã¹ã¦ã«ã対å¿ããã½ã¼ã¹ãã®ã³ãã¼ããã½ããã¦ã§ã¢ã®ã ãã¨ãã§ä¸è¬çã«ä½¿ãããèä¹ æ§ã®ããç©ççåªä½ã§é å¸ããæ¨ãè¨è¼ããããã®éãç©ççã«ãã®ã½ã¼ã¹ã®ä¼éãè¡ãã®ã«ãããæ£å½ãªã³ã¹ã以ä¸ã®ä¾¡ æ ¼ãè¦æ±ãã¦ã¯ãªããªãããããã¯ã(2) ã対å¿ããã½ã¼ã¹ããç¡æã§ãããã¯ã¼ã¯ãµã¼ãããè¤è£½ããããã®ã¢ã¯ã»ã¹ãæä¾ã ãæ¨ãè¨è¼ããã +c) ãªãã¸ã§ã¯ãã³ã¼ãã®åã ã®ã³ãã¼ãã対å¿ããã½ã¼ã¹ãæä¾ããã¨ããæ¸é¢ã«ããç³ãåºã®ã³ãã¼ã¨ãã£ããã«ä¼éããããã®é¸æè¢ã¯ç¹å¥ãªå ´åã ãã¤éåæ¥çãªå ´åã®ã¿ã«ãããã¦ããªãããªãã¸ã§ã¯ãã³ã¼ããä¸è¨å°é 6bã«åè´ããç³ãåºã¨ãã£ããã«åé ããå ´åã«ã®ã¿ã«èªããããã +d) ãªãã¸ã§ã¯ãã³ã¼ãããæå®ã®å ´æããè¤è£½ããããã®ã¢ã¯ã»ã¹ãæä¾ãããã¨ã«ãã£ã¦ä¼éããã対å¿ããã½ã¼ã¹ãã«å¯¾ãã¦ãåãå ´æãéã㦠åãæ¹æ³ã§è¤è£½ããããã®åçã®ã¢ã¯ã»ã¹ãæä¾ãããä¼éã¯ç¡æã§ãææ°æã課ãã¦ãæ§ããªãããã対å¿ããã½ã¼ã¹ãã«å¯¾ãã¦è¿½å çãªèª²éãè¡ã£ ã¦ã¯ãªããªããåé è ã«å¯¾ãã¦ãã対å¿ããã½ã¼ã¹ãããªãã¸ã§ã¯ãã³ã¼ãã¨ãã£ããã«è¤è£½ãããã¨ã義åã¥ããå¿ è¦ã¯ãªãããªãã¸ã§ã¯ãã³ã¼ãã® è¤è£½å ããããã¯ã¼ã¯ãµã¼ãã®å ´åã対å¿ããã½ã¼ã¹ã¯åçã®è¤è£½æ©è½ããµãã¼ãããç°ãªã£ããµã¼ã(ããªãã第ä¸è ãéå¶)ä¸ã«ãã£ã¦ãè¯ãããã® å ´åããªãã¸ã§ã¯ãã³ã¼ãã®åãã«ãã対å¿ããã½ã¼ã¹ãã¯ã©ãã§è¦ã¤ããããããæ確ã«æ示ãã¦ãããªããã°ãªããªããã©ã ®ãµã¼ããã対å¿ããã½ã¼ ã¹ãããã¹ããããã«é¢ããããããªãã¯ã対å¿ããã½ã¼ã¹ãããããã®æ¡ é ãæºããããã«å¿ è¦ãªãããå©ç¨å¯è½ã§ãããã¨ãä¿è¨¼ãã責任ãããã +e) ãªãã¸ã§ã¯ãã³ã¼ãããã¢ã»ãã¼ã»ãã¢ä¼éã使ã£ã¦ä¼éããããã ããã®å ´åãããªãã¯ä¸è¨å°é 6dã«å¾ãããã®ä½åã®ãªãã¸ã§ã¯ãã³ã¼ã㨠ã対å¿ããã½ã¼ã¹ããã©ãã§ä¸è¬å ¬è¡ã«ç¡æã§æä¾ãããã®ãã¨ãããã¨ãä»ã®ãã¢ã«ç¥ããã¦ãããªããã°ãªããªãã +ãªãã¸ã§ã¯ãã³ã¼ãã®åé¢ããä¸é¨ã§ããããã®ã½ã¼ã¹ã³ã¼ããã対å¿ããã½ã¼ã¹ããããã·ã¹ãã ã©ã¤ãã©ãªãã¨ãã¦é¤å¤ããã¦ãããã®ã¯ããªãã¸ã§ã¯ãã³ã¼ãä½åãä¼éããå ´åã«å«ããå¿ è¦ã¯ãªãã + +ãã¦ã¼ã¶è£½åã(User Product)ã¨ã¯ã(1)ãã³ã³ã·ã¥ã¼ã製åã(consumer product)ãããªãã¡ãå人ãåä¾ããããã¯å®¶åºç¨ã«é常使ç¨ãããæå½¢å人è³ç£ãã¹ã¦ãããããã¯(2)å± ä½æã«ãããå°å ¥ãç®çã«è¨è¨ãªãã販売ããããã®ãã¹ã¦ãæããããç©åãã³ã³ã·ã¥ã¼ã製åã§ãããã決å®ããéç義ãããå ´åã«ã¯ã極åç¯å²ãåºããæ¹åã§æ±ºå®ãããã¹ãã§ãããããã§ãããç¹å®ã®ã¦ã¼ã¶ã«ãã£ã¦åé ãããããç¹å®ã®è£½åã«ã¨ã£ã¦ã®ãé常使ç¨ã (nomally used)ã¨ã¯ããã®ç¨®ã®è£½åã«ããã¦å ¸åçãªããããã¯ä¸è¬çãªå©ç¨ã®ãã¨ã§ããããã®ç¹å®ã®ã¦ã¼ã¶ãç½®ãããç¶æ³ãããã®ç¹å®ã®ã¦ã¼ã¶ããã®è£½åãå®éã«ã©ã使ã£ã¦ããããã©ã使ããã¨ãäºæãã¦ãããããããã¯äºæããã¦ãããã¨ã¯é¢ä¿ãªãããã®è£½åã«ç¸å½ãªåæ¥çã ç£æ¥çã¾ãã¯éã³ã³ã·ã¥ã¼ãçãªå©ç¨æ³ããã£ãã¨ãã¦ããããããå©ç¨ããã®è£½åã®å¯ä¸éè¦ãªå©ç¨å½¢æ ã代表ãããã®ã§ãªãéãããã®è£½åã¯ã³ã³ã·ã¥ã¼ã製åã§ããã + +ã¦ã¼ã¶è£½åã®ããã¤ã³ã¹ãã¼ã«ç¨æ å ±ãã(Installation Information)ã¨ã¯ãã¦ã¼ã¶è£½åå ã®ãä¿è·ãããä½åãã«é¢ãã¦ãã対å¿ããã½ã¼ã¹ãã®æ¹å¤ããããã¼ã¸ã§ã³ããå¾ããããä¿è·ãããä½åãã®æ¹å¤ããããã¼ã¸ã§ã³ããã¤ã³ã¹ãã¼ã«ãå®è¡ããããã«å¿ è¦ãªææ³ãæé ãèªè¨¼ãã¼ããã®ä»ã®æ å ±ãã¹ã¦ãæå³ããããã®æ å ±ã¯ãæ¹å¤ããããªãã¸ã§ã¯ãã³ã¼ãã®ç¶ç¶çãªåä½ããæ¹å¤ãçºãããã¨ãããã¨ã«ãã£ã¦ã®ã¿æå¦ãããã妨害ããããã¨ã決ãã¦ãªããã¨ãä¿è¨¼ããã®ã«ååãªãã®ã§ãªããã°ãªããªãã + +æ¬ç¯ã®ä¸ã«ããã¦ãä½åãã¦ã¼ã¶è£½åã®å ã§ãã¾ãã¯ã¦ã¼ã¶è£½åã¨å ±ã«ããããã¯ç¹ã«ã¦ã¼ã¶è£½åã§ã®å©ç¨ã念é ã«ããã¦ãªãã¸ã§ã¯ãã³ã¼ãã§ä¼éããã¾ããã®ä¼éãã¦ã¼ã¶è£½åã®åé è ã¸ã®ææã¨å©ç¨ã®æ¨©å©ã®æ°¸é ãªããææã®ç§»è»¢ã®ä¸é¨ã¨ãã¦èµ·ããå ´å(移転ãã©ã®ããã«è¡ããããã¯åããªã)ããã®æ¡é ã®ä¸ã§ã対å¿ããã½ã¼ã¹ãã¯ãã¤ã³ã¹ãã¼ã«ç¨æ å ±ãã¨å ±ã«æä¾ãããªããã°ãªããªããããããã®æ¡ä»¶ã¯ãããªãã¨ç¬¬ä¸è ã®ãããããæ¹å¤ããããªãã¸ã§ã¯ãã³ã¼ããã¦ã¼ã¶è£½åã«ã¤ã³ã¹ãã¼ã«ããè½åãæãã¦ããªãéã«ã¯é©ç¨ãããªã(ä¾ãã°ãä½åãROMã«ã¤ã³ã¹ãã¼ã«ããã¦ããå ´å)ã + +ãã¤ã³ã¹ãã¼ã«ç¨æ å ±ããæä¾ããæ¡ä»¶ã«ã¯ãåé è ã«ãã£ã¦æ¹å¤ãªããã¤ã³ã¹ãã¼ã«ãããä½åããããã¯ããããä½åãæ¹å¤ãªããã¤ã³ã¹ãã¼ã«ãããã¦ã¼ã¶è£½åã«å¯¾ãããµã¼ãã¹ãä¿è¨¼ãã¢ãããã¼ããæä¾ãã¤ã¥ããã¨ããæ¡ä»¶ã¯å«ã¾ããªããæ¹å¤èªä½ããããã¯ã¼ã¯ã®éç¨ã«å®è³ªçãã¤æ害ãªå½±é¿ãããããããããã¯ã¼ã¯ãä»ããã³ãã¥ãã±ã¼ã·ã§ã³ã®ãããã³ã«ãè¦åã«éåããå ´åã«ã¯ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ãæå¦ãã¦ãæ§ããªãã + +ä¼éãããã対å¿ããã½ã¼ã¹ããæä¾ããããã¤ã³ã¹ãã¼ã«ç¨æ å ±ããæ¬ç¯ãæºããããã«ã¯ãããããå ¬ã«ææ¸åãããå½¢å¼ã§(ãã¤å ¬è¡ã«å¯¾ãã¦ã½ã¼ã¹ã³ã¼ãå½¢å¼ã§å©ç¨å¯è½ãªå®è£ ã¨ã¨ãã«)æä¾ãããªããã°ãªããªãããã®å ´åããããã®å§ç¸®å±éãèªã¿è¾¼ã¿ãè¤è£½ã«ç¹å¥ãªãã¹ã¯ã¼ãããã¼ãå¿ è¦ã¨ãã¦ãªããªãã + +7. 追å çæ¡é +ã追å ç許å¯ã(Additional permissions)ã¨ã¯ãæ¬è¨±è«¾æ¸ã課ãæ¡ä»¶ã«ä¸ã¤ããã以ä¸ã®ä¾å¤ãè¨ãããã¨ã«ãããæ¬è¨±è«¾æ¸ã®æ¡é ãè£è¶³ããæ¡é ã®ãã¨ã§ããããããã°ã©ã ãå ¨ä½ã«é©ç¨å¯è½ãªè¿½å ç許å¯ã¯ãé©ç¨å¯è½ãªæ³ã®ä¸ã§ããããæå¹ã§ããéããããããããããæ¬è¨±è«¾æ¸ã«å«ã¾ãã¦ãããã®ããã«æ±ãããªããã°ãªããªãã追å ç許å¯ããããã°ã©ã ãã®ä¸é¨ã«ã®ã¿é©ç¨ãããå ´åããã®é¨åã«é¢ãã¦ã¯ãããã£ã追å ç許å¯ã®ä¸ã§å¥éå©ç¨å¯è½ã ãããããã°ã©ã ãå ¨ä½ã¨ãã¦ã¯è¿½å ç許å¯ã«é¢ãããªãæ¬è¨±è«¾æ¸ã«ãã£ã¦ã®ã¿ç®¡çãããã + +ããªãããä¿è·ãããä½åãã®ã³ãã¼ãä¼éããå ´åãããªãã¯è¿½å ç許å¯ããã®ã³ãã¼ããããã¯ãã®ä¸é¨ããåé¤ãããã¨ãé¸æã§ãã(追å ç許å¯ã¯ãããªããä½åããã種ã®å½¢ã§æ¹å¤ããéã«ã¯ããããã許å¯èªèº«ã®åé¤ãè¦æ±ãããããªå½¢ã§æ¸ããã¦ããã)ãããªãã¯ãããªãã«ãã£ã¦ãä¿è·ãããä½åãã«è¿½å ãããããªããé©åãªãã³ãã¼ã©ã¤ãã許å¯ãæããããä¸ãããã¨ãã§ããéãããã®ä¸é¨åã«è¿½å ç許å¯ãè¨å®ãããã¨ãã§ããã + +æ¬è¨±è«¾æ¸ã®ä»ã®æ¡ä»¶ã«é¢ããããããªãããä¿è·ãããä½åãã«è¿½å ããä¸é¨åã«ã¤ãã¦(ãã®é¨åã®ãã³ãã¼ã©ã¤ããä¿æè ãã«ãã£ã¦æ£å¼ã«è¨±å¯ããã¦ããã°)ãæ¬è¨±è«¾æ¸ã®æ¡é ãã以ä¸ã«ç¤ºãæ¡é ã§è£è¶³ãããã¨ãã§ãã: + +a) æ¬è¨±è«¾æ¸ç¬¬15é ããã³ç¬¬16é ã®æ¡é ã¨ã¯ç°ãªã£ãå½¢ã§ä¿è¨¼ã®å¦èªã責任ã®éå®ã主張ããããããã¯ã +b) 追å ããä¸é¨åã«ããã¦ãæ示çã§å¦¥å½ãªæ³çåç¥ãä½è ç¹å®ã®ä¿å ¨ãã¾ãã¯ãããå«ãä½åã«ããã¦ãé©åãªæ³çåç¥ãã®è¡¨ç¤ºãè¦æ±ããããããã¯ã +c) 追å ããä¸é¨åã®åºèªãä¸å½ã«è¡¨ç¤ºãããã¨ãç¦ãããããããã¯ãã®ãããªä¸é¨åã®æ¹å¤ããããã¼ã¸ã§ã³ã¯ãªãªã¸ãã«ã®ãã¼ã¸ã§ã³ã¨ã¯ç°ãªã£ ã¦ããã¨ãããã¨ãé©åãªæ¹æ³ã§å°ã¥ãããã¨ãè¦æ±ããããããã¯ã +d) ãã®ä¸é¨åã®ã©ã¤ã»ã³ãµã¼ãä½è ã®ååãã宣ä¼ç®çã§å©ç¨ãããã¨ãå¶éããããããã¯ã +e) åååãåæ¨ããµã¼ãã¹ãã¼ã¯ã®å©ç¨ã«é¢ãã¦ãåæ¨æ³ã«å¾ã権å©ãæä¸ãããã¨ãæå¦ããããããã¯ã +f) ãã®ä¸é¨å(ãããã¯ãã®æ¹å¤ããããã¼ã¸ã§ã³)ãä¼éããè ã«ãåé è ã¸ã®è²¬ä»»ã«é¢ãã¦å¥ç´ä¸ã®å¼ãåããããããããã責任ãç´æ¥çã«ãããã£ãã©ã¤ã»ã³ãµã¼ãä½è ã«ã¾ã§èª²ããããå ´åããã®ä¸é¨åã®ã©ã¤ã»ã³ãµã¼ãä½è ã®å 責ãè¦æ±ããã +ä»ã®é許å¯çãªè¿½å çæ¡é ã¯ä¸è¨ç¬¬10é ãæå³ããã¨ããã®ããããªã権å©å¶éã(further restrictions)ã¨ã¿ãªããããããªããåé ãããããã°ã©ã ãããããã¯ãã®ä¸é¨ã«ããããæ¬è¨±è«¾æ¸ã¨ã¨ãã«ãããªã権å©å¶éã§ããæ¡é ã«ãã£ã¦ã管çããã¦ããã¨è¿°ã¹ãåç¥ãå«ã¾ãã¦ããå ´åã«ã¯ãããªãã¯ãããã£ãæ¡é ãåé¤ãã¦æ§ããªããããã©ã¤ã»ã³ã¹ææ¸ã«ãããªã権å©å¶éããµãã¾ãã¦ãããããããæ¬è¨±è«¾æ¸ã®ä¸ã§ã®å許諾ãä¼éã許å¯ãã¦ãããªãã°ãããªãã¯ãã®ã©ã¤ã»ã³ã¹ææ¸ã®æ¡é ã«ãã£ã¦ç®¡çããã¦ããä¸é¨åããä¿è·ãããä½åãã«è¿½å ãããã¨ãã§ããããã ããã®å ´åããããªã権å©å¶éã¯ãã®ãããªå許諾ãä¼éã§ã¯ç¡å¹ã¨ããªããã°ãªããªãã + +ããªããæ¬ç¯ã«å¾ã£ã¦ãä¿è·ãããèä½ç©ãã«æ¡é ã追å ããå ´åãããªãã¯é¢ä¿ããã½ã¼ã¹ãã¡ã¤ã«ä¸ã«ããããã®ãã¡ã¤ã«ã«é©ç¨ããã追å çæ¡é ã«é¢ãã声æããããã¯é©ç¨å¯è½ãªæ¡é ãè¦ã¤ãããã¨ãã§ããå ´æã示ãåç¥ãæ²è¼ããªããã°ãªããªãã + +追å çæ¡é ã¯ãããã許å¯çã§ãããã¨é許å¯çã§ãããã¨ãå¥éæ¸é¢åãããã©ã¤ã»ã³ã¹ã¨ããå½¢å¼ã§è¿°ã¹ããã¦ãããããæ¬è¨±è«¾æ¸ã¸ã®ä¾å¤ã¨ãã¦è¿°ã¹ããã¦ããããä¸è¨ã®è¦ä»¶ã¯ã©ã¡ãã®å ´åã§ãé©ç¨ãããã + +8. çµäº +ããªãã¯ãä¿è·ãããä½åãããæ¬è¨±è«¾æ¸ã®ä¸ã§æ示çã«æä¾ããã¦ããå ´åãé¤ãã¦ãæ®åãã¾ãã¯æ¹å¤ãã¦ã¯ãªããªãããã以å¤ã«ãä¿è·ãããä½åããæ®åãã¾ãã¯æ¹å¤ãããã¨ãã試ã¿ã¯ãã¹ã¦ç¡å¹ã§ãããæ¬è¨±è«¾æ¸ã®ä¸ã§ããªãã«èªãããã権å©(ä¸è¨ç¬¬11é ã®ç¬¬3段è½ã«å¾ãæä¸ãããããã³ãã©ã¤ã»ã³ã¹ãã¹ã¦ãå«ã)ãèªåçã«çµäºããããã¨ã«ãªãã + +ããããªãããããªããæ¬è¨±è«¾æ¸ã¸ã®éåããã¹ã¦ä¸æ¢ãããªãã°ãããªããããç¹å®ã®ãã³ãã¼ã©ã¤ããä¿æè ããå¾ãã©ã¤ã»ã³ã¹ã¯ã(a)ãã®ãã³ãã¼ã©ã¤ããä¿æè ãæç½ãã¤æ±ºå®çã«ããªãã¸ã®ã©ã¤ã»ã³ã¹ãçµäºããããããããã¯ãããªãã¾ã§ã¯æ«å®çã«ã(b)ãã®ãã³ãã¼ã©ã¤ããä¿æè ããããªãã«å¯¾ãéåã«ã¤ãã¦ãä½ããã®æ£å½ãªæ段ã«ããã©ã¤ã»ã³ã¹åæ¢å¾60æ¥ä»¥å ã«éç¥ãããã¨ãã§ããªãã£ãå ´åã«ã¯æ°¸ç¶çã«ãå復ãããã + +å ãã¦ãããªããããç¹å®ã®ãã³ãã¼ã©ã¤ããä¿æè ããå¾ãã©ã¤ã»ã³ã¹ã¯ããã®ãã³ãã¼ã©ã¤ããä¿æè ãããªãã«å¯¾ãã¦éåãä½ããã®æ£å½ãªæ段ã§éç¥ããããããåã«ãã®ãã³ãã¼ã©ã¤ããä¿æè ããã(å½è©²ä½åã«éãããã®ãã³ãã¼ã©ã¤ããä¿æè ã®ä½åã®ããããã«é¢ãã¦)æ¬è¨±è«¾æ¸ã«é¢ããéåã®éç¥ãåé ãããã¨ããªããããã«ããªãããã®éç¥ãåé ãã¦ãã30æ¥ä»¥å ã«éåãæ£ããå ´åãæ°¸ç¶çã«å復ãããã + +æ¬ç¯ã«å¾ãããªãã®æ¨©å©ãçµäºããå ´åã§ããæ¬è¨±è«¾æ¸ã«å¾ã£ã¦ããªãããã³ãã¼ã権å©ãåé ããå½äºè ãå¾ã許諾ã¯çµäºããªããããªãã®æ¨©å©ãçµäºãããæ°¸ç¶çã«å復ãããªãã£ãå ´åã«ã¯ãããªãã¯åãã©ã¤ã»ã³ã¹å¯¾è±¡ã«é¢ãä¸è¨ç¬¬10é ã«å¾ã£ã¦æ°ãã«ã©ã¤ã»ã³ã¹ãåé ããè³æ ¼ã失ããã®ã¨ããã + +9. ã³ãã¼ã®ææã«å¿ è¦ã¨ãããªãå諾 +ããªãã¯ããããã°ã©ã ãã®ã³ãã¼ãåé ãããã¯å®è¡ããããã«æ¬è¨±è«¾æ¸ãå諾ããå¿ è¦ã¯ãªããã³ãã¼ãåé ããããã«ãã¢ã»ãã¼ã»ãã¢ä¼éã使ã£ãçµæã¨ãã¦ã®ã¿çºçãããä¿è·ãããä½åãã®ä»éçãªæ®åããåæ§ã«å諾ãå¿ è¦ã¨ããªããããããªãããä»ã®å ´åã«ããã¦ã¯ãæ¬è¨±è«¾æ¸ä»¥å¤ã«ããªãã«å¯¾ãã¦ãä¿è·ãããä½åãã®æ®åãæ¹å¤ããã許å¯ãèªãããã®ã¯ãªãããããã®è¡çºã¯ãæ¬è¨±è«¾æ¸ãå諾ããªãéããã³ãã¼ã©ã¤ããã侵害ãããã¨ã«ãªããããã§ããä¿è·ãããä½åããæ¹å¤ãããã¯æ®åãããã¨ã«ãããããªãã¯ããããè¡çºãè¡ãããã«æ¬è¨±è«¾æ¸ãå諾ããã¨ãããã¨ã示ãããã¨ã«ãªãã + +10. ä¸æµã®åé è ã¸ã®èªåç許諾 +ããªãããä¿è·ãããä½åããä¼éãããã³ã«ãåé è ã¯èªåçã«ãªãªã¸ãã«ã®ã©ã¤ã»ã³ãµã¼ãããæ¬è¨±è«¾æ¸ã«å¾ããã®ä½åãå®è¡ãæ¹å¤ãæ®åããã©ã¤ã»ã³ã¹ãå¾ãããªããããªãã«ã¯ç¬¬ä¸è ãæ¬è¨±è«¾æ¸ã«å¾ããã¨ãå¼·å¶ãã責任ã¯ãªãã + +ã主ä½åå¼ã(entity transaction)ã¨ã¯ãããçµç¹ãã®ãã®ããªãããã®çµç¹ã®å®è³ªçã«å ¨ã¦ã®è³ç£ã®æ¯é 権ã移転ãããããããã¯çµç¹ã®ç´°ååãåä½µãè¡ããããããªåå¼ãæãããã主ä½åå¼ã®çµæã¨ãã¦ãä¿è·ãããä½åãã®æ®åãèµ·ãã£ãå ´åãä½åã®ã³ãã¼ãåé ããããããã®åå¼å½äºè ã¯ãå©å®³é¢ä¿ã®ããå½äºè ã®å ä»»è ããããã®å ä»»è ãå段è½ã«å¾ã£ã¦æããããããã¯ä¸ãããã¨ãã§ããããã®ä½åã«é¢ããã©ã¤ã»ã³ã¹ãã¾ããã¹ã¦åé ãããå ãã¦åã ã®åå¼å½äºè ã¯ãå©å®³é¢ä¿ã®ããå ä»»è ããããã®å ä»»è ãæãã¦ããããé©æ£ãªåªåã«ãã£ã¦å¾ããã¨ãå¯è½ãªéãã«ããã¦ããã®ä½åã®ã対å¿ããã½ã¼ã¹ãã®ææ権ãå¾ã権å©ãæããã + +ããªãã¯æ¬è¨±è«¾æ¸ã®ä¸ã§æä¸ãããããããã¯ç¢ºç´ããã権å©ã®è¡ä½¿ã«å¯¾ãã¦ãæ¬è¨±è«¾æ¸ãè¦å®ãã以ä¸ã®ãããªã権å©å¶éã課ãã¦ã¯ãªããªãããã¨ãã°ãããªãã¯ã©ã¤ã»ã³ã¹æããã¤ã¤ã«ãã£ãä»ã®æéããæ¬è¨±è«¾æ¸ã®ä¸ã§èªãããã¦ãã権å©ã®è¡ä½¿ã«é¢ãã¦èª²ãã¦ã¯ãªããªããã¾ããããªãã¯ãããã°ã©ã ãããã®ä¸é¨ã®ä½æãå©ç¨ã販売ã販売ã®ç³ãåºãåãè¾¼ã¿ã«ãã£ã¦ä½ããã®ããã³ãã¯ã¬ã¼ã ã侵害ãããã¨ãã¦ã訴è¨(訴è¨ã«ãããå対è«æ±ãªããå訴ãå«ã)ãéå§ãã¦ã¯ãªããªãã + +11. ç¹è¨± +ãè²¢ç®è ã(contributor)ã¨ã¯ãæ¬è¨±è«¾æ¸ã®ä¸ã§ãããã°ã©ã ãããããã¯ãããã°ã©ã ããåºã«ããä½åãå©ç¨ãããã¨ãæ£å¼ã«è¨±å¯ãããã³ãã¼ã©ã¤ããä¿æè ã®ãã¨ãæããå¾ã£ã¦ããã®ããã«ãã¦ã©ã¤ã»ã³ã¹ãããä½åã¯ãè²¢ç®è ã«ãããè²¢ç®è ãã¼ã¸ã§ã³ã(contributor version)ã¨å¼ã°ããã + +ããè²¢ç®è ã®ãå¿ é ããã³ãã¯ã¬ã¼ã ã(essential patent claims)ã¨ã¯ããã§ã«åå¾ãã¦ãããããããã¯ä»å¾åå¾ããè¦è¾¼ã¿ãããããããã®è²¢ç®è ãç¾å¨ææãªããæ¯é ãã¦ããã¨è¨ããç¹è¨±ã®ãã¡ãè²¢ç®è ãã¼ã¸ã§ã³ã«å¯¾ãã¦ãæ¬è¨±è«¾æ¸ã§è¨±å¯ããã¦ãããããªä½æãå©ç¨ã販売ã¨ãã£ãä½ããã®å½¢ã®è¡çºãè¡ããã¨ã«ãã£ã¦ä¾µå®³ãããå¯è½æ§ãããããã³ãã¯ã¬ã¼ã ã®ãã¹ã¦ãæå³ããããã ããè²¢ç®è ãã¼ã¸ã§ã³ãããã«æ¹å¤ããçµæã¨ãã¦ã®ã¿ä¾µå®³ããããããªã¯ã¬ã¼ã ã¯å«ã¾ããªãããã®å®ç¾©ã«ããã¦ããæ¯é ãã«ã¯æ¬è¨±è«¾æ¸ã課ãæ¡ä»¶ã¨æ´åçãªããæ¹ã§ç¹è¨±ã®å許諾ãèªãã権å©ãå«ã¾ããã + +åã ã®è²¢ç®è ã¯ããªãã«å¯¾ãã¦ããã®è²¢ç®è ã®å¿ é ããã³ãã¯ã¬ã¼ã ã«é¢ããããªãããã®è²¢ç®è ãã¼ã¸ã§ã³ã®å 容ãä½æãå©ç¨ã販売ã販売ã®ç³ãåºãåãè¾¼ã¿ããã®ä»å®è¡ãæ¹å¤ãæ®åããããã«å¿ è¦ãªãéæä»çã§å ¨ä¸ççã«æå¹ããã¤ãã¤ã¤ã«ãã£ããªã¼ã®ããã³ãã©ã¤ã»ã³ã¹ãæä¸ããã + +以ä¸ã®3段è½ã«ããã¦ããããã³ãã©ã¤ã»ã³ã¹ããã¨ã¯ãããç¹è¨±ãå®æ½ããªãã¨ããæ示çãªåå®ãã³ãããã¡ã³ãã®ãã¹ã¦ãæã(ä¾ãã°ãããç¹è¨±ã®å®æ½ã«å¯¾ããæ示çãªè¨±å¯ããç¹è¨±ä¾µå®³è¨´è¨ãæèµ·ããªãã¨ããèªç´ãªã©)ããã®ãããªãããã³ãã©ã¤ã»ã³ã¹ããããå½äºè ã«ãæä¸ãããã¨ã¯ããã®å½äºè ã¨ç¹è¨±ãå®æ½ããªãã¨ããåå®ãã³ãããã¡ã³ããçµã¶ãã¨ãæå³ããã + +ããããªããããä¿è·ãããä½åãã®ä¼éããããããããããã³ãã©ã¤ã»ã³ã¹ãã«ä¾åãã¦ããããã£ã¦ãã®ä½åã®ã対å¿ããã½ã¼ã¹ãã¯ããã¹ã¦ã®äººã«ã¨ã£ã¦ãå ¬è¡ãå©ç¨å¯è½ãªãããã¯ã¼ã¯ãµã¼ããä»ã®å®¹æã«ã¢ã¯ã»ã¹å¯è½ãªæ段ãéããç¡æãã¤æ¬è¨±è«¾æ¸ã«å¾ã£ã¦è¤è£½å¯è½ã§ã¯ãªãã¨ãããã¨ãç¥ããªããè¡ããªãã°ãããªã㯠(1)ã対å¿ããã½ã¼ã¹ããåæ§ã«å©ç¨å¯è½ã«ãããã (2)ãã®ç¹å®ã®ä½åã«é¢ãã¦ãããã³ãã©ã¤ã»ã³ã¹ãããå¾ããã便çãèªãå¥å¥ªãããããããã¯(3)ä¸æµã®åé è ã«å¯¾ãã¦ããæ¬è¨±è«¾æ¸ã®æ¡é ã¨æ´åçãªå½¢ã§ããããã³ãã©ã¤ã»ã³ã¹ããæ¡å¤§ãããããã«è¨ãããã®ãããããè¡ããªããã°ãªããªããããã§ããããã³ãã©ã¤ã»ã³ã¹ãã«ä¾åããã®ãç¥ããªãããã¨ããã®ã¯ãããªãããä¿è·ã ããä½åããããå½ã§ä¼éãããã¨ããããã¯ããªãã®åé è ããä¿è·ãããèä½ç©ããããå½ã§å©ç¨ãããã¨ãããããã³ãã©ã¤ã»ã³ã¹ããæä¸ãããªãéãããã®å½ã«ããã¦ãããªãã«ã¨ã£ã¦ãããæå¹ã ã¨ä¿¡ããã ãã®çç±ãããä¸ã¤ããã以ä¸ã®åå®å¯è½ãªç¹è¨±ã侵害ããã¨ãããã¨ãå®éã«ç¥ã£ã¦ããã¨ãããã¨ã§ããã + +ããä¸å¯¾ä¸ã®åå¼ãåå®ã«åºã¥ãããããã¯é¢é£ãã¦ãããªãããä¿è·ãããä½åãã®ä¼éãã¾ãã¯ä¼éã«ãã£ã¦å¼ãèµ·ããããæ®åãè¡ãããã®éãä¿è·ãããä½åããåé ããä¸é¨ã®å½äºè ã«å¯¾ãã¦ããä¿è·ãããä½åãã®ç¹å®ã®ã³ãã¼ã®å©ç¨ãæ®åãæ¹å¤ãã¾ãã¯ä¼éãæ£å¼ã«è¨±å¯ãããããªãããã³ãã©ã¤ã»ã³ã¹ããæä¸ãããªãã°ãããªããæä¸ãããããã³ãã©ã¤ã»ã³ã¹ãã¯ãä¿è·ãããä½åãããããåºã«ããä½åã®ãã¹ã¦ã®åé è ã«ã¾ã§èªåçã«æ¡å¤§ããããã¨ã«ãªãã + +ãããããã³ãã©ã¤ã»ã³ã¹ãããå·®å¥çã(discriminatory)ã§ããã¨ã¯ãæ¬è¨±è«¾æ¸ã®ä¸ã§æ確ã«èªããããä¸ã¤ããã以ä¸ã®æ¨©å©ãããããã³ãã©ã¤ã»ã³ã¹ããã«ãã¼ããç¯å²å ã«å«ã¾ãªãã£ããããããã権å©ã®è¡ä½¿ãç¦ãããããããã¯æ¨©å©ãè¡ä½¿ããªããã¨ãæ¡ä»¶ã¨ãã¦èª²ããããªãã®ã§ããå ´åãæããããªããä¸æ¹ã®å½äºè ã¨ããã½ããã¦ã§ã¢ã®é å¸ãçæ¥ã¨ãã第ä¸è ã¨ã®éã§ãããªãã¯ç¬¬ä¸è ã«å¯¾ããä½åãä¼éããæ´»åã®ç¨åº¦ã«åºã¥ãã¦æ¯æããè¡ãä¸æ¹ã第ä¸è ã¯ãããªããããä¿è·ãããä½åããåé ãããã¹ã¦ã®å½äºè ã«å¯¾ãã¦ãå·®å¥çããªãããã³ãã©ã¤ã»ã³ã¹ããã(a)ããªããä¼éãããä¿è·ãããä½åãã®ã³ãã¼(ã¾ãã¯ããããã³ãã¼ããä½æãããã³ãã¼)ã«å¯¾ãã¦ãã¾ãã¯(b)ãä¿è·ãããä½åããå«ãç¹å® 製åãç·¨éç©ãã主è¦ãªããããã¯é¢é£ãã対象ã¨ãã¦æä¸ãããã¨ãããããªåå®ãçµãã§ããå ´åãããªãã¯ãä¿è·ãããä½åããä¼éãã¦ã¯ãªããªãããã ããããªãããã®ãããªåå®ãç· çµãããããããã³ãã©ã¤ã»ã³ã¹ããæä¸ãããã®ã2007å¹´3æ28æ¥ãã以åã§ããå ´åã¯æ¬ç¯ã®ä¾å¤ã¨ããã + +æ¬è¨±è«¾æ¸ã«å«ã¾ããä¸åã®è¨è¿°ã¯ãé©ç¨å¯è½ãªç¹è¨±æ³ã®ä¸ã§ããªããå©ç¨å¯è½ãªæé»ã®ã©ã¤ã»ã³ã¹ããã®ä»ä¾µå®³ã¸ã®é²å¾¡æ段ãæé¤ãããå¶éãããããããã«è§£éããã¦ã¯ãªããªãã + +12. ä»è ã®èªç±ãæã渡ãã¦ã¯ãªããªã +ä½ããã®æ¡ä»¶(è£å¤æã®æ令ãåå®ãªã©)ãããªãã«èª²ãããããããæ¬è¨±è«¾æ¸ã®æ¡ä»¶ã¨çç¾ããã¨ãã¦ããããªããæ¬è¨±è«¾æ¸ã®æ¡ä»¶ãå ãããã¨ã«ã¯ãªããªããããªããããä¿è·ãããä½åãããæ¬è¨±è«¾æ¸ã課ã義åã¨ä»ã®é¢é£ãã義åã®ä¸¡æ¹ãåæã«æºãããããªå½¢ã§ä¼éã§ããªãã®ã§ããã°ãçµæã¨ãã¦ããªãããããä¼éãããã¨ã¯å ¨ãä¸å¯è½ã¨ãããã¨ã«ãªããä¾ãã°ããªãããèªåããããã°ã©ã ããä¼éãã人ã ãããã«ä¼éãè¡ãå ´åã«ã¯ãå½¼ããããã¤ã¤ã«ãã£ãå¾´åãããã¨ãããããªç¾©åãè² ãæ¡é ã«åæãã¦ããå ´åãããªãããããã£ãæ¡é ã¨æ¬è¨±è«¾æ¸ã®ä¸¡æ¹ãæºããã«ã¯ããããã°ã©ã ãã®ä¼éãå®å ¨ã«æ¢ãã¦ãã¾ããããªãã ããã + +13. GNU Affero ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ã¨ã®å©ç¨ +æ¬è¨±è«¾æ¸ã«å«ã¾ããä»ã®æ¡ä»¶ã«é¢ããããããªãã«ã¯ããä¿è·ãããä½åãã GNU Affero ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ãã¼ã¸ã§ã³3ã®ä¸ã§è¨±è«¾ãããä½åã¨ãªã³ã¯ã¾ãã¯çµåãã¦åä¸ã®çµåç©ã¨ãããã®çµæç©ãä¼éãã許å¯ãä¸ãããããæ¬è¨±è«¾æ¸ã®æ¡é ã¯ãä¿è·ãããä½åãã§ããé¨åã«é¢ãã¦ã¯ãã®ã¾ã¾é©ç¨ãããããçµåç©ããèªä½ã¨ãã¦ã¯ãGNU Affero ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ã®ç¬¬13é ãè¦å®ããããããã¯ã¼ã¯ãä»ããããã¨ãã«é¢ããç¹æ®ãªæ¡ä»¶ãé©ç¨ããããã¨ã«ãªãã + +(訳注: 訳åºæç¹ã§ã¯ãGNU Affero GPLã¯æ¹å®ä½æ¥ãä¾ç¶ç¶ãã¦ããã確å®ãã¼ã¸ã§ã³ã¯ãªãªã¼ã¹ããã¦ããªãã http://gplv3.fsf.org/agplv3-dd2-guide.htmlãåç §ããã) + +14. æ¬è¨±è«¾æ¸ã®æ¹è¨ããããã¼ã¸ã§ã³ +ããªã¼ã½ããã¦ã§ã¢è²¡å£ã¯ãæ¹è¨ãããããããã¯æ°ãããã¼ã¸ã§ã³ã® GNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ãæãã«è§¦ãã¦çºè¡ãããã¨ãã§ããããã®ãããªæ°ãã¼ã¸ã§ã³ã¯ããã®ç²¾ç¥ã«ããã¦ã¯ç¾å¨ã®ãã¼ã¸ã§ã³ã¨ä¼¼ããã®ã«ãªãã ããããç´°é¨ã«ã¤ãã¦ã¯æ°ããªåé¡ãæ¸å¿µã解決ãã¹ãç°ãªããã®ã«ãªãã ããã + +ããããã®ãã¼ã¸ã§ã³ã«ã¯ãè¦åããã¤ããããªãã¼ã¸ã§ã³çªå·ãæ¯ããã¦ããããããã°ã©ã ãã«ãããç¹å®ã®ãã¼ã¸ã§ã³çªå·ãæ¯ãããGNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ãããã以éã®ãã¼ã¸ã§ã³ã®ãããã(or any later version)ããé©ç¨ãããã¨æå®ããã¦ããå ´åãããªãã¯æå®ãããçªå·ã®ãã¼ã¸ã§ã³ãããã以éã«ããªã¼ã½ããã¦ã§ã¢è²¡å£ã«ãã£ã¦çºè¡ãããããããã®ãã¼ã¸ã§ã³ã®ã©ã¡ãã®å©ç¨æ¡ä»¶ã«å¾ãããé¸ã¶ãã¨ãã§ããããããã°ã©ã ããæ¬è¨±è«¾æ¸ã®ãã¼ã¸ã§ã³çªå·ãæå®ãã¦ããªãã£ãå ´åã«ã¯ãããªãã¯ããªã¼ã½ããã¦ã§ã¢è²¡å£ãããã¾ã§ã«çºè¡ãããã¼ã¸ã§ã³ã®ä¸ããã©ããé¸æãã¦ãæ§ããªãã + +(訳注: æ¥æ¬èªè¨³ã®ãã¼ã¸ã§ã³ã¯æ¥ä»ã§ç®¡çãã¦ãããåé ãè¦ãã) + +ãããã°ã©ã ãã«ããã¦ãGNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ã®å°æ¥ã®ãã¼ã¸ã§ã³ã®ãã¡ã©ããé©ç¨ãããããã¯ä»£ç人ã決å®ã§ãããã¨æå®ããã¦ããå ´åããã®ä»£ç人ãããããã¼ã¸ã§ã³ãå諾ããã¨è¿°ã¹ãå ¬çãªå£°æã¯ãããªãã«å¯¾ãããã®ãããã°ã©ã ãã«é¢ãã¦ãã®ãã¼ã¸ã§ã³ã®GNU GPLãé¸ã¶ãã¨ãæ°¸ç¶çãã¤æ£å¼ã«è¨±å¯ããã®ã¨çããã + +æ¬è¨±è«¾æ¸ã®ä»å¾ã®ãã¼ã¸ã§ã³ã§ã¯ãããªãã«è¿½å çãªãã¾ãã¯å¾æ¥ã¨ã¯ç°ãªã£ãå½¢ã§ã®è¨±å¯ãä¸ãããããããªããããããªãããä½è ããã³ãã¼ã©ã¤ããä¿æè ã«å¯¾ããããªãã以éã®ãã¼ã¸ã§ã³ã«å¾ããã¨ãé¸ãã çµæã¨ãã¦ã追å çãªç¾©åã課ãããããã¨ã¯ãªãã + +15. ä¿è¨¼ã®å¦èª +ãããã°ã©ã ãã«ã¯ãé©ç¨å¯è½ãªæ³ã§è¨±å¯ããã¦ããç¯å²ã«ããã¦ä½ã®ä¿è¨¼ããªããæ¸é¢ã§è¿°ã¹ããã¦ããªãéãããã³ãã¼ã©ã¤ããä¿æè ããã®ä»ã®å½äºè ã¯ãããã°ã©ã ããããããã¾ã¾(as is)ãã§ãæ示çãæ示çãåããããããªã種é¡ã®ä¿è¨¼ããªãæä¾ããããã®ä¿è¨¼ã«ã¯ãåç¨å¯è½æ§ãç¹å®ç®çã¸ã®é©åæ§ã®æé»çä¿è¨¼ãå«ã¾ãããããããã«éå®ãããªãããããã°ã©ã ãã®è³ªãæ§è½ã«é¢ãããªã¹ã¯ã¯ãã¹ã¦ããªãã«å¸°å±ããããããã°ã©ã ãã«åé¡ãããã¨å¤æããå ´åãããªãã¯å¿ è¦ãªãã¹ã¦ã®å¯¾å¿ãè£ä¿®ãä¿®æ£ã«ãããè²»ç¨ãè² ããã®ã¨ããã + +16. 責任ã®éå® +é©ç¨å¯è½ãªæ³ã«ããã¦ç¾©åã¥ããããããæ¸é¢ã«ããåæããªãéãããã³ãã¼ã©ã¤ããä¿æè ãããã¯ãã®ä»ãããã°ã©ã ããä¸è¨ã§è¨±å¯ãããéãã«æ¹å¤ãããã¯ä¼éããå½äºè ã¯ããã¨ãããããä¿æè ãä»ã®å½äºè ãæ害ãçºçããå¯è½æ§ã«ã¤ãã¦äºåã«éç¥ããã¦ããã¨ãã¦ããããªãã«å¯¾ãã¦æå®³è³ å責任ãæãããã¨ã¯ãªããããã§ããæ害ã«ã¯ããããã°ã©ã ãã®å©ç¨ãããã¯å©ç¨ã§ããªããã¨ããçºçããä¸è¬çãç¹æ®çãå¶ç¶çãå¿ ç¶çãªæ害ã®ãã¹ã¦ãå«ã¾ãã(ãã¼ã¿ã®æ¶å¤±ããã¼ã¿ã®ä¸æ£ç¢ºãªè§£éãããªãã第ä¸è ã«ãã£ã¦è¢«ã£ãããããã¯ãããã°ã©ã ããä»ã®ããã°ã©ã ã¨ãã£ããã«ãã¾ãåä½ããªãã£ãããã«å¼ãèµ·ããããæ害ãªã©ãå«ã¾ãããããããã«éå®ãããªã)ã + +17. 第15é ã¨ç¬¬16é ã®è§£éã«ã¤ã㦠+ä¸è¨ã®ãããªä¿è¨¼ã®å¦èªã責任ã®éå®ããç¹å®å½å ã«ããã¦ãããã£ãæ¡é ãæå®ããéãã®æ³çå¹åãæã¡å¾ãªãå ´åãå審è£å¤æã¯ããããã°ã©ã ãã«é¢é£ãããã¹ã¦ã®æ°äºè²¬ä»»ã®çµ¶å¯¾çæ£æ¨©ã«æãè¿ãèèããå½å æ³ãé©ç¨ãã¹ãã§ããããã ããå ±é ¬ã®è¦è¿ãã¨ãã¦è²¬ä»»ã®ä¿è¨¼ãå¼ãåãããããã°ã©ã ãã®ã³ãã¼ã«ä»éããå ´åã¯é¤ãã + +å©ç¨æ¡ä»¶ã¯ããã¾ã§ + +以ä¸ã®æ¡é ãããªãã®æ°ããããã°ã©ã ã«é©ç¨ããæ¹æ³ +ããªããæ°ããªããã°ã©ã ãéçºããã¨ãã¦ãå ¬è¡ã«ãã£ã¦ãããå©ç¨ãããå¯è½æ§ãæ大éé«ããããªãã°ããã®ããã°ã©ã ãããªã¼ã½ããã¦ã§ã¢ã¨ããæ¬è¨±è«¾æ¸ã®æ¡é ã®ä¸ã§èª°ã§ãåé å¸ãªããå¤æ´ã§ããããã«ããã®ãæåã®éã§ãã + +ããããããã«ã¯ãããã°ã©ã ã«ä»¥ä¸ã®ãããªåç¥ãä»ãå ãã¦ãã ããããã®å ´åãä¿è¨¼ãé¤å¤ããã¦ããã¨ãããã¨ãæãå¹æçã«æè¨ãããããããããã®ã½ã¼ã¹ãã¡ã¤ã«ã®åé ã«å示ãä»ãå ããã®ãæãå®å ¨ã§ããå°ãªãã¨ãããCopyrightãããå§ã¾ãè¡ã¨ãåç¥å ¨æãããå ´æã¸ã®ãã¤ã³ã¿ã ãã¯åãã¡ã¤ã«ã«å«ãã¦ããã¦ãã ããã + +<one line to give the program's name and a brief idea of what it does.> +Copyright (C) <year> <name of author> +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 3 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, see <http://www.gnu.org/licenses/>. +(訳: +<ããã°ã©ã ã®ååã¨ããããä½ããããã«ã¤ãã¦ã®ç°¡åãªèª¬æã1è¡ç¨åº¦ã> +Copyright (C) <å¹´> <ä½è ã®åå> +ãã®ããã°ã©ã ã¯ããªã¼ã½ããã¦ã§ã¢ã§ããããªãã¯ããããããªã¼ã½ããã¦ã§ã¢è²¡å£ã«ãã£ã¦çºè¡ãããGNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸(ãã¼ã¸ã§ã³3ãã ãã以éã®ãã¼ã¸ã§ã³ã®ãã¡ã©ãã)ãå®ããæ¡ä»¶ã®ä¸ã§åé å¸ã¾ãã¯æ¹å¤ãããã¨ãã§ãã¾ãã +ãã®ããã°ã©ã ã¯æç¨ã§ãããã¨ãé¡ã£ã¦é å¸ããã¾ããã*å ¨ãã®ç¡ä¿è¨¼ *ã§ããåæ¥å¯è½æ§ã®ä¿è¨¼ãç¹å®ç®çã¸ã®é©åæ§ã¯ãè¨å¤ã«ç¤ºããããã®ã å«ããå ¨ãåå¨ãã¾ããã詳ããã¯GNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ãã覧ãã ããã +ããªãã¯ãã®ããã°ã©ã ã¨å ±ã«ãGNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ã®ã³ãã¼ãä¸é¨åãåã£ã¦ããã¯ãã§ããããåãåã£ã¦ããªããã°ã<http://www.gnu.org/licenses/> ãã覧ãã ããã +) +é»åãç´ã®ã¡ã¼ã«ã§ããªãã«åãåãããæ¹æ³ã«ã¤ãã¦ã®æ å ±ãæ¸ãå ãã¾ãããã + +ããã°ã©ã ã端æ«ã§å¯¾è©±çã«æ©è½ãããã®ãªãã°ã対話ã¢ã¼ãã§èµ·åããéã«ä»¥ä¸ã®ãããªçãåç¥ãåºåãããããã«ãã¦ãã ãã: + +<program> Copyright (C) <year> <name of author> +This program comes with ABSOLUTELY NO WARRANTY; for details type show w'. This is free software, and you are welcome to redistribute it under certain conditions; type show c' for details. +(訳: +<ããã°ã©ã å> Copyright (C) <å¹´> <ä½è ã®åå> +ãã®ããã°ã©ã ã¯*å ¨ãã®ç¡ä¿è¨¼*ã§æä¾ããã¾ãã詳ããã¯ãshow wã㨠ã¿ã¤ããã¦ä¸ãããããã¯ããªã¼ã½ããã¦ã§ã¢ã§ãããããæ¡ä»¶ã®ä¸ã§åé å¸ãããã¨ã奨å±ããã¦ãã¾ãã詳ããã¯ãshow cãã¨ã¿ã¤ããã¦ä¸ããã +) +ããã§ãä»®æ³çãªã³ãã³ããshow wãã¨ãshow cã ã¯ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ã®é©åãªé¨åã表示ããããã«ãªã£ã¦ããªããã°ãªãã¾ããããã¡ãããããªãã®ããã°ã©ã ã®ã³ãã³ãã¯ä¾ã¨éã£ã¦ãã¦ããã¾ãã¾ãããGUIã¤ã³ã¿ã¼ãã§ã¼ã¹ãªãã°ã代ããã«ãâ¦ã«ã¤ãã¦ãããã¯ã¹ã使ãã®ãè¯ãã§ãããã + +ã¾ããå¿ è¦ãªãã°ããªãã¯ã(ããã°ã©ãã¼ã¨ãã¦åãã¦ããã)ããªãã®éç¨ä¸»ããããã¯å ´åã«ãã£ã¦ã¯å¦æ ¡ã«ä¾é ¼ãã¦ããã®ããã°ã©ã ã«é¢ãããèä½æ¨©æ¾æ£å£°æ(copyright disclaimer)ãã«ç½²åãã¦ãããã¹ãã§ãããã®ç¹ã«é¢ãããã詳ããæ å ±ããGNU GPLãé©ç¨ãããã®æ¡é ã«å¾ãã«ã¯ã©ãããã°ããã®ãã«ã¤ãã¦ã¯ã<http://www.gnu.org/licenses/> ãã覧ãã ããã + +GNU ä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ã§ã¯ãããªãã®ããã°ã©ã ããããã©ã¤ã¨ã¿ãªãªããã°ã©ã ã«çµ±åãããã¨ãèªãã¦ãã¾ãããããªãã®ããã°ã©ã ããµãã«ã¼ãã³ã©ã¤ãã©ãªãªãã°ããããã©ã¤ã¨ã¿ãªãªã¢ããªã±ã¼ã·ã§ã³ã¨ããªãã®ã©ã¤ãã©ãªããªã³ã¯ãããã¨ã許å¯ããã»ããããæçã§ããã¨èããããããã¾ããããããããããªãã®æããã¨ãªãã°ããã®è¨±è«¾æ¸ã®ä»£ããã«GNU å£çä¸è¬å ¬è¡å©ç¨è¨±è«¾æ¸ãé©ç¨ãã¦ãã ããããã ããã®åã«ããã² <http://www.gnu.org/philosophy/why-not-lgpl.ja.html> ããèªã¿ãã ããã + +### åæ ### + +GNU GENERAL PUBLIC LICENSE + +Version 3, 29 June 2007 + +Copyright 息 2007 Free Software Foundation, Inc. <http://fsf.org/> + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The GNU General Public License is a free, copyleft license for software and other kinds of works. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS + +0. Definitions. +âThis Licenseâ refers to version 3 of the GNU General Public License. + +âCopyrightâ also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +âThe Programâ refers to any copyrightable work licensed under this License. Each licensee is addressed as âyouâ. âLicenseesâ and ârecipientsâ may be individuals or organizations. + +To âmodifyâ a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a âmodified versionâ of the earlier work or a work âbased onâ the earlier work. + +A âcovered workâ means either the unmodified Program or a work based on the Program. + +To âpropagateâ a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To âconveyâ a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays âAppropriate Legal Noticesâ to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The âsource codeâ for a work means the preferred form of the work for making modifications to it. âObject codeâ means any non-source form of a work. + +A âStandard Interfaceâ means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The âSystem Librariesâ of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A âMajor Componentâ, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The âCorresponding Sourceâ for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + +a) The work must carry prominent notices stating that you modified it, and giving a relevant date. +b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to âkeep intact all noticesâ. +c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. +d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an âaggregateâ if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + +a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. +b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. +c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. +d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. +e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A âUser Productâ is either (1) a âconsumer productâ, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, ânormally usedâ refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +âInstallation Informationâ for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +âAdditional permissionsâ are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + +a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or +b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or +c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or +d) Limiting the use for publicity purposes of names of licensors or authors of the material; or +e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or +f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. +All other non-permissive additional terms are considered âfurther restrictionsâ within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An âentity transactionâ is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. +A âcontributorâ is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's âcontributor versionâ. + +A contributor's âessential patent claimsâ are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, âcontrolâ includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a âpatent licenseâ is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To âgrantâ such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. âKnowingly relyingâ means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is âdiscriminatoryâ if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. + +13. Use with the GNU Affero General Public License. +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. + +14. Revised Versions of this License. +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License âor any later versionâ applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM âAS ISâ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the âcopyrightâ line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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 3 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, see <http://www.gnu.org/licenses/>. +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an âabout boxâ. + +You should also get your employer (if you work as a programmer) or school, if any, to sign a âcopyright disclaimerâ for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. + +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. \ No newline at end of file Added: tags/Ver.0.1.5/Server/SQL/databaseSQL.txt =================================================================== --- tags/Ver.0.1.5/Server/SQL/databaseSQL.txt (rev 0) +++ tags/Ver.0.1.5/Server/SQL/databaseSQL.txt 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,3 @@ + +CREATE SCHEMA IF NOT EXISTS `o_sangokushi` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; + Added: tags/Ver.0.1.5/Server/SQL/dump.sql =================================================================== --- tags/Ver.0.1.5/Server/SQL/dump.sql (rev 0) +++ tags/Ver.0.1.5/Server/SQL/dump.sql 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,358 @@ +-- MySQL dump 10.13 Distrib 5.1.44, for unknown-linux-gnu (x86_64) +-- +-- Host: localhost Database: o_sangokushi +-- ------------------------------------------------------ +-- Server version 5.1.44-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `t_AICharacter` +-- + +DROP TABLE IF EXISTS `t_AICharacter`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_AICharacter` ( + `charID` smallint(5) unsigned NOT NULL, + `charName` varchar(40) DEFAULT NULL, + `charType` varchar(1) DEFAULT NULL, + `countryID` smallint(5) unsigned DEFAULT NULL, + `paramID` smallint(5) unsigned DEFAULT NULL, + `lastUpdateDate` datetime DEFAULT NULL, + PRIMARY KEY (`charID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_AICharacter` +-- + +LOCK TABLES `t_AICharacter` WRITE; +/*!40000 ALTER TABLE `t_AICharacter` DISABLE KEYS */; +INSERT INTO `t_AICharacter` VALUES (1,'æ¹æ','s',1,101,'2010-05-12 20:29:06'),(2,'æ¹ä¸','b',1,102,'2010-05-12 20:29:06'),(3,'éå','b',1,103,'2010-05-12 20:29:06'),(4,'è彧','b',1,104,'2010-05-12 20:29:06'),(5,'èæ¸','b',1,105,'2010-05-12 20:29:06'),(6,'ç¨æ±','b',1,106,'2010-05-12 20:29:06'),(7,'è³è©¡','b',1,107,'2010-05-12 20:29:06'),(8,'å¸é¦¬æ¿','b',1,108,'2010-05-12 20:29:06'),(9,'å¾åº¶','b',1,109,'2010-05-12 20:29:06'),(10,'許楮','b',1,110,'2010-05-12 20:29:06'),(11,'å¤ä¾¯æ','b',1,111,'2010-05-12 20:29:06'),(12,'å¤ä¾¯æ·µ','b',1,112,'2010-05-12 20:29:06'),(13,'æ¹ä»','b',1,113,'2010-05-12 20:29:06'),(14,'æ¹æ´ª','b',1,114,'2010-05-12 20:29:06'),(15,'楽é²','b',1,115,'2010-05-12 20:29:06'),(16,'æå ¸','b',1,116,'2010-05-12 20:29:06'),(17,'å¼µé¼','b',1,117,'2010-05-12 20:29:06'),(18,'å¾æ','b',1,118,'2010-05-12 20:29:06'),(19,'å¼µé','b',1,119,'2010-05-12 20:29:06'),(20,'äºç¦','b',1,120,'2010-05-12 20:29:06'),(21,'é¾å¾³','b',1,121,'2010-05-12 20:29:06'),(22,'åå','s',3,122,'2010-05-12 20:29:06'),(23,'諸è亮','b',3,123,'2010-05-12 20:29:06'),(24,'é¾çµ±','b',3,124,'2010-05-12 20:29:06'),(25,'æ³æ£','b',3,125,'2010-05-12 20:29:06'),(26,'馬è¯','b',3,126,'2010-05-12 20:29:06'),(27,'é¢ç¾½','b',3,127,'2010-05-12 20:29:06'),(28,'å¼µé£','b',3,128,'2010-05-12 20:29:06'),(29,'é¦¬è¶ ','b',3,129,'2010-05-12 20:29:06'),(30,'é»å¿ ','b',3,130,'2010-05-12 20:29:06'),(31,'è¶é²','b',3,131,'2010-05-12 20:29:06'),(32,'é延','b',3,132,'2010-05-12 20:29:06'),(33,'馬岱','b',3,133,'2010-05-12 20:29:07'),(34,'å§ç¶','b',3,134,'2010-05-12 20:29:07'),(35,'é¢å¹³','b',3,135,'2010-05-12 20:29:07'),(36,'åé','b',3,136,'2010-05-12 20:29:07'),(37,'åå°','b',3,137,'2010-05-12 20:29:07'),(38,'å»å ','b',3,138,'2010-05-12 20:29:07'),(39,'å¨å','b',3,139,'2010-05-12 20:29:07'),(40,'å³é¡','b',3,140,'2010-05-12 20:29:07'),(41,'éºè³','b',3,141,'2010-05-12 20:29:07'),(42,'æå³','b',3,142,'2010-05-12 20:29:07'),(43,'å «æ¨©','s',2,143,'2010-05-12 20:29:07'),(44,'å«å°é¦','b',2,144,'2010-05-12 20:29:07'),(45,'å¨å©','b',2,145,'2010-05-12 20:29:07'),(46,'é¸é','b',2,146,'2010-05-12 20:29:07'),(47,'åè','b',2,147,'2010-05-12 20:29:07'),(48,'é¯ç²','b',2,148,'2010-05-12 20:29:07'),(49,'èç¿»','b',2,149,'2010-05-12 20:29:07'),(50,'ç¨æ®','b',2,150,'2010-05-12 20:29:07'),(51,'太å²æ ','b',2,151,'2010-05-12 20:29:07'),(52,'ç寧','b',2,152,'2010-05-12 20:29:07'),(53,'é»è','b',2,153,'2010-05-12 20:29:07'),(54,'éå½','b',2,154,'2010-05-12 20:29:07'),(55,'å¨æ³°','b',2,155,'2010-05-12 20:29:07'),(56,'è欽','b',2,156,'2010-05-12 20:29:07'),(57,'åæ','b',2,157,'2010-05-12 20:29:07'),(58,'åçµ±','b',2,158,'2010-05-12 20:29:07'),(59,'æ±æ²»','b',2,159,'2010-05-12 20:29:07'),(60,'å¾ç','b',2,160,'2010-05-12 20:29:07'),(61,'é³æ¦','b',2,161,'2010-05-12 20:29:07'),(62,'è£è¥²','b',2,162,'2010-05-12 20:29:07'),(63,'æ±ç¶','b',2,163,'2010-05-12 20:29:07'); +/*!40000 ALTER TABLE `t_AICharacter` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t_battle` +-- + +DROP TABLE IF EXISTS `t_battle`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_battle` ( + `battleID` int(8) unsigned NOT NULL, + `roomID` smallint(5) unsigned DEFAULT NULL, + `userID` varchar(10) DEFAULT NULL, + `userName` varchar(40) DEFAULT NULL, + `countryID` smallint(5) unsigned NOT NULL, + `charKbn` varchar(1) DEFAULT NULL, + `mapChipNo` smallint(5) unsigned DEFAULT NULL, + `power` smallint(5) unsigned DEFAULT NULL, + `mobility` smallint(5) unsigned DEFAULT NULL, + `exclusionKbn` tinyint(4) DEFAULT NULL, + `lastUpdateDate` datetime DEFAULT NULL, + PRIMARY KEY (`battleID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_battle` +-- + +LOCK TABLES `t_battle` WRITE; +/*!40000 ALTER TABLE `t_battle` DISABLE KEYS */; +INSERT INTO `t_battle` VALUES (945153,3,'10','許楮',1,'s',86,900,500,0,'2010-10-08 04:31:01'),(7501122,2,'19','å¼µé',1,'b',2610,800,700,0,'2010-11-03 15:00:02'),(10608984,5,'43','å«æ¨©',2,'s',182,700,700,0,'2010-10-12 02:37:01'),(13222551,1,'7','è³è©¡',1,'b',2700,100,300,0,'2010-10-26 06:59:01'),(14637581,1,'15','楽é²',1,'s',2700,700,600,0,'2010-10-26 06:59:01'),(15575980,1,'20','äºç¦',1,'b',0,700,700,0,'2010-10-26 06:59:01'),(19692992,2,'37','åå°',3,'b',136,600,500,0,'2010-11-03 15:00:02'),(39307961,3,'59','æ±æ²»',2,'b',2516,700,600,0,'2010-10-08 04:31:01'),(41467218,3,'7','è³è©¡',1,'b',185,100,300,0,'2010-10-08 04:31:01'),(42378115,4,'59','æ±æ²»',2,'b',2564,700,600,0,'2010-10-12 02:40:02'),(43230937,3,'51','太å²æ ',2,'b',2518,900,600,0,'2010-10-08 04:31:01'),(44916361,4,'49','èç¿»',2,'s',2561,200,300,0,'2010-10-12 02:40:02'),(46146849,5,'62','è£è¥²',2,'b',46,600,500,0,'2010-10-12 02:37:01'),(49580858,2,'21','é¾å¾³',1,'s',2565,900,900,0,'2010-11-03 15 :00:02'),(56601943,2,'33','馬岱',3,'b',222,800,900,0,'2010-11-03 15:00:02'),(62013701,4,'53','é»è',2,'b',2652,600,600,0,'2010-10-12 02:40:02'),(72906091,5,'53','é»è',2,'b',2658,600,600,0,'2010-10-12 02:37:01'),(73978570,3,'62','è£è¥²',2,'s',2608,600,500,0,'2010-10-08 04:31:01'),(75526361,1,'61','é³æ¦',2,'b',139,600,600,0,'2010-10-26 06:59:01'),(76119411,4,'32','é延',3,'b',50,800,500,0,'2010-10-12 02:40:02'),(76975254,5,'29','é¦¬è¶ ',3,'b',2564,1000,900,0,'2010-10-12 02:37:01'),(80799074,1,'50','ç¨æ®',2,'b',47,700,500,0,'2010-10-26 06:59:01'),(81219871,2,'41','éºè³',3,'s',2477,500,600,0,'2010-11-03 15:00:02'),(85238533,4,'40','å³é¡',3,'b',182,600,500,0,'2010-10-12 02:40:02'),(89918517,5,'31','è¶é²',3,'s',2565,900,800,0,'2010-10-12 02:37:01'),(90374217,2,'5','èæ¸',1,'b',2561,100,300,0,'2010-11-03 15:00:02'),(92561503,5,'36','åé',3,'b',2518,600,600,0,'2010-10-12 02:37:01'),(93312956,3,'18','å¾æ',1,'b',135,800,600,0,'2010-10-08 04:31:01'),(9344364 3,1,'43','å«æ¨©',2,'s',2477,700,700,0,'2010-10-26 06:59:01'),(99724597,4,'22','åå',3,'s',95,600,900,0,'2010-10-12 02:40:02'); +/*!40000 ALTER TABLE `t_battle` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t_battleTemp` +-- + +DROP TABLE IF EXISTS `t_battleTemp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_battleTemp` ( + `userID` varchar(10) NOT NULL, + `roomID` smallint(5) unsigned DEFAULT NULL, + `moveMapChipNo` smallint(5) unsigned DEFAULT NULL, + `power` smallint(5) unsigned DEFAULT NULL, + PRIMARY KEY (`userID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_battleTemp` +-- + +LOCK TABLES `t_battleTemp` WRITE; +/*!40000 ALTER TABLE `t_battleTemp` DISABLE KEYS */; +/*!40000 ALTER TABLE `t_battleTemp` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t_country` +-- + +DROP TABLE IF EXISTS `t_country`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_country` ( + `countryID` smallint(6) NOT NULL DEFAULT '0', + `countryName` varchar(40) DEFAULT NULL, + `lastUpdateDate` datetime DEFAULT NULL, + PRIMARY KEY (`countryID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_country` +-- + +LOCK TABLES `t_country` WRITE; +/*!40000 ALTER TABLE `t_country` DISABLE KEYS */; +INSERT INTO `t_country` VALUES (1,'é','2010-04-20 01:42:09'),(2,'å','2010-04-20 01:42:09'),(3,'è','2010-04-20 01:42:09'); +/*!40000 ALTER TABLE `t_country` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t_defaultParam` +-- + +DROP TABLE IF EXISTS `t_defaultParam`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_defaultParam` ( + `paramID` smallint(5) unsigned NOT NULL, + `paramType` tinyint(3) unsigned DEFAULT NULL, + `paramName` varchar(40) DEFAULT NULL, + `power` smallint(5) unsigned DEFAULT NULL, + `mobility` smallint(5) unsigned DEFAULT NULL, + `lastUpdateDate` datetime DEFAULT NULL, + PRIMARY KEY (`paramID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_defaultParam` +-- + +LOCK TABLES `t_defaultParam` WRITE; +/*!40000 ALTER TABLE `t_defaultParam` DISABLE KEYS */; +INSERT INTO `t_defaultParam` VALUES (101,0,'AIæ¦å°ç¨',800,700,'2010-05-02 01:59:48'),(102,0,'AIæ¦å°ç¨',700,600,'2010-05-02 01:59:48'),(103,0,'AIæ¦å°ç¨',100,300,'2010-05-02 01:59:48'),(104,0,'AIæ¦å°ç¨',100,300,'2010-05-02 01:59:48'),(105,0,'AIæ¦å°ç¨',100,300,'2010-05-02 01:59:48'),(106,0,'AIæ¦å°ç¨',100,300,'2010-05-02 01:59:48'),(107,0,'AIæ¦å°ç¨',100,300,'2010-05-02 01:59:48'),(108,0,'AIæ¦å°ç¨',300,800,'2010-05-02 01:59:48'),(109,0,'AIæ¦å°ç¨',200,300,'2010-05-02 01:59:48'),(110,0,'AIæ¦å°ç¨',900,500,'2010-05-02 01:59:48'),(111,0,'AIæ¦å°ç¨',800,700,'2010-05-02 01:59:48'),(112,0,'AIæ¦å°ç¨',800,1000,'2010-05-02 01:59:48'),(113,0,'AIæ¦å°ç¨',700,800,'2010-05-02 01:59:48'),(114,0,'AIæ¦å°ç¨',600,500,'2010-05-02 01:59:48'),(115,0,'AIæ¦å°ç¨',700,600,'2010-05-02 01:59:48'),(116,0,'AIæ¦å°ç¨',700,600,'2010-05-02 01:59:48'),(117,0,'AIæ¦å°ç¨',800,700,'2010-05-02 01:59:48'),(118,0,'AIæ¦å°ç¨',800,600,'2010-05-02 01:59:48'),(119,0,'AIæ¦å° ç¨',800,700,'2010-05-02 01:59:48'),(120,0,'AIæ¦å°ç¨',700,700,'2010-05-02 01:59:48'),(121,0,'AIæ¦å°ç¨',900,900,'2010-05-02 01:59:48'),(122,0,'AIæ¦å°ç¨',600,900,'2010-05-02 01:59:48'),(123,0,'AIæ¦å°ç¨',300,300,'2010-05-02 01:59:48'),(124,0,'AIæ¦å°ç¨',300,300,'2010-05-02 01:59:48'),(125,0,'AIæ¦å°ç¨',100,300,'2010-05-02 01:59:48'),(126,0,'AIæ¦å°ç¨',100,300,'2010-05-02 01:59:48'),(127,0,'AIæ¦å°ç¨',900,1000,'2010-05-02 01:59:48'),(128,0,'AIæ¦å°ç¨',1000,400,'2010-05-02 01:59:48'),(129,0,'AIæ¦å°ç¨',1000,900,'2010-05-02 01:59:48'),(130,0,'AIæ¦å°ç¨',900,600,'2010-05-02 01:59:48'),(131,0,'AIæ¦å°ç¨',900,800,'2010-05-02 01:59:48'),(132,0,'AIæ¦å°ç¨',800,500,'2010-05-02 01:59:48'),(133,0,'AIæ¦å°ç¨',800,900,'2010-05-02 01:59:48'),(134,0,'AIæ¦å°ç¨',800,900,'2010-05-02 01:59:48'),(135,0,'AIæ¦å°ç¨',700,500,'2010-05-02 01:59:48'),(136,0,'AIæ¦å°ç¨',600,600,'2010-05-02 01:59:48'),(137,0,'AIæ¦å°ç¨',600,500,'2010-05-02 01:59:48'),(138,0,'AIæ¦å °ç¨',600,700,'2010-05-02 01:59:48'),(139,0,'AIæ¦å°ç¨',700,800,'2010-05-02 01:59:48'),(140,0,'AIæ¦å°ç¨',600,500,'2010-05-02 01:59:48'),(141,0,'AIæ¦å°ç¨',500,600,'2010-05-02 01:59:48'),(142,0,'AIæ¦å°ç¨',800,700,'2010-05-02 01:59:48'),(143,0,'AIæ¦å°ç¨',700,700,'2010-05-02 01:59:48'),(144,0,'AIæ¦å°ç¨',500,800,'2010-05-02 01:59:48'),(145,0,'AIæ¦å°ç¨',600,700,'2010-05-02 01:59:48'),(146,0,'AIæ¦å°ç¨',300,600,'2010-05-02 01:59:48'),(147,0,'AIæ¦å°ç¨',800,600,'2010-05-02 01:59:48'),(148,0,'AIæ¦å°ç¨',200,700,'2010-05-02 01:59:48'),(149,0,'AIæ¦å°ç¨',200,300,'2010-05-02 01:59:48'),(150,0,'AIæ¦å°ç¨',700,500,'2010-05-02 01:59:48'),(151,0,'AIæ¦å°ç¨',900,600,'2010-05-02 01:59:48'),(152,0,'AIæ¦å°ç¨',900,700,'2010-05-02 01:59:48'),(153,0,'AIæ¦å°ç¨',600,600,'2010-05-02 01:59:48'),(154,0,'AIæ¦å°ç¨',800,600,'2010-05-02 01:59:48'),(155,0,'AIæ¦å°ç¨',800,600,'2010-05-02 01:59:48'),(156,0,'AIæ¦å°ç¨',700,600,'2010-05-02 01:59:48'),(157,0,'AIæ¦å° ç¨',700,700,'2010-05-02 01:59:48'),(158,0,'AIæ¦å°ç¨',700,700,'2010-05-02 01:59:48'),(159,0,'AIæ¦å°ç¨',700,600,'2010-05-02 01:59:48'),(160,0,'AIæ¦å°ç¨',700,600,'2010-05-02 01:59:48'),(161,0,'AIæ¦å°ç¨',600,600,'2010-05-02 01:59:48'),(162,0,'AIæ¦å°ç¨',600,500,'2010-05-02 01:59:48'),(163,0,'AIæ¦å°ç¨',600,600,'2010-05-02 01:59:48'),(164,1,'ã¦ã¼ã¶ããã©ã«ã',80,70,'2010-05-02 01:59:48'); +/*!40000 ALTER TABLE `t_defaultParam` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t_login` +-- + +DROP TABLE IF EXISTS `t_login`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_login` ( + `userID` varchar(10) NOT NULL, + `sessionID` varchar(40) NOT NULL, + `lastLoginDate` datetime DEFAULT NULL, + `lastUpdateDate` datetime DEFAULT NULL, + PRIMARY KEY (`userID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_login` +-- + +LOCK TABLES `t_login` WRITE; +/*!40000 ALTER TABLE `t_login` DISABLE KEYS */; +INSERT INTO `t_login` VALUES ('0af5f8de42','4df09d417bde93d97216e94bdf9cb961','2010-05-05 20:51:25','2010-05-05 20:51:25'),('37ac5d6b0d','bed77a77b83fb7cf3c75e0f5c4e4f52e','2010-05-05 20:45:12','2010-05-05 20:45:12'),('3aef5d0e7e','1b7c583445661e50b86d3452f394fd12','2010-05-05 20:57:42','2010-05-05 20:57:42'),('3f84dc5de6','9b3b74f5415e669695c6cca1c36b30a2','2010-05-05 22:06:57','2010-05-05 22:06:57'),('928b4b3e82','18fec080f8af2018daab74bd5f04e845','2010-05-05 20:43:34','2010-05-05 20:43:34'),('948c0971bf','6f0000180568405017dea2b3608cd718','2010-05-05 20:45:54','2010-05-05 20:45:54'),('9e057cf47e','626f9f6ea21a2302b59922eaaf0cec24','2010-05-05 20:55:03','2010-05-05 20:55:03'),('b266f8f283','b959fa2fafeff4848052093679a8c5ae','2010-05-05 21:34:25','2010-05-05 21:34:25'),('U0143b5eaa','8cd8e9807805a77f6ff9619d6af38d3a','2010-05-12 01:39:10','2010-05-12 01:39:10'),('U02536abdc','b656eeae8055953eed8da583ec20af87','2010-05-12 03:38:06','2010-05-12 03:38:06'),('U0260be6f9','c580e a56f6aec5a88bd019deb1adc4b1','2010-06-22 01:37:22','2010-06-22 01:37:22'),('U02de1eda6','1d18cb5c6d9ece5bbcdc06d00b2ace62','2010-06-02 23:19:23','2010-06-02 23:19:23'),('U035514ce8','c7e5cbb32d79f059ff6fa173c79090eb','2010-05-08 19:40:02','2010-05-08 19:40:02'),('U0510488ed','dc5a04f9945f57aae193bfa638475ba8','2010-05-10 18:55:45','2010-05-10 18:55:45'),('U07d2e9cd2','e33c41cbc1e7476a1293c55bd687d7ff','2010-09-22 23:35:50','2010-09-22 23:35:50'),('U07fb00210','423a2cdbe6466cb7448ebc6461ec8ae5','2010-05-12 09:05:22','2010-05-12 09:05:22'),('U0b8206c6e','f1a8cea60f199c37e05d4c4077549332','2010-10-05 23:54:58','2010-10-05 23:54:58'),('U0db742293','263c82492cd04b56bd7b18d581773f97','2010-05-10 09:54:44','2010-05-10 09:54:44'),('U0ffa91522','b2c1d6f284e1ea2b0d76690d9e3b19d7','2010-09-10 23:57:16','2010-09-10 23:57:16'),('U102a015a9','eb82472533b5a08226ca8da428bea5cc','2010-06-24 23:41:27','2010-06-24 23:41:27'),('U10728c8da','795e5b147bbed2fa567f87c530be9f52','2010-10-01 21:37:42 ','2010-10-01 21:37:42'),('U108c2da78','7dd55fd1a5f60548dfc58f2330a51d6f','2010-06-22 01:48:04','2010-06-22 01:48:04'),('U12d7cb916','db20d55236a46e2cd738fd5b823d77f9','2010-09-22 23:34:35','2010-09-22 23:34:35'),('U137417190','14451d859b2bfa9279555d4477b640cd','2010-10-01 01:55:32','2010-10-01 01:55:32'),('U1927eccd1','3fd0d6cdadb77abe5b749d6de4d6bcd9','2010-05-10 22:34:38','2010-05-10 22:34:38'),('U23ce4fe74','ca27fc1e98441caf86e895cec63cf9ff','2010-07-01 23:43:59','2010-07-01 23:43:59'),('U265f6d781','142d8acf19047a457d214f367de580ff','2010-05-13 23:19:02','2010-05-13 23:19:02'),('U2a666421e','6784946c1ff755d9358d08a74402bc26','2010-10-08 12:41:40','2010-10-08 12:41:40'),('U2b0f32a9d','361e6dd49e8a83aa81a1816ed0ce28e8','2010-05-08 19:35:24','2010-05-08 19:35:24'),('U2d6e34d0c','d0c4fa18f8e4981c38da01773a951820','2010-09-22 23:34:50','2010-09-22 23:34:50'),('U308f7a20e','98d9673d8924649bcce57f8ec8e768ce','2010-05-08 19:30:40','2010-05-08 19:30:40'),('U31519e2a3','42727c569 96760bee7738dbfd410926c','2010-05-25 22:51:19','2010-05-25 22:51:19'),('U3274f4fc3','8b16b9b0a926fc1807fd7561d5ab3252','2010-07-01 23:12:32','2010-07-01 23:12:32'),('U32e997c8e','95f3d585837f3edd3a4402f9a3aa9a20','2010-05-22 23:54:04','2010-05-22 23:54:04'),('U3745c6424','67d5333c413deeb7a01d0937777b0b3b','2010-05-12 03:01:22','2010-05-12 03:01:22'),('U385674d53','454f2c0dadcc1890d8077be580c2845b','2010-08-04 01:01:40','2010-08-04 01:01:40'),('U391f182a6','425b90fb65ee8f33e8992671dfedc9ef','2010-10-05 23:46:09','2010-10-05 23:46:09'),('U39865d82b','adde2ee9b8396a5d8d6cc1f094943d4a','2010-09-18 14:16:34','2010-09-18 14:16:34'),('U3cdc73c40','23597d67d4c48742cd7954030cea3014','2010-08-23 03:24:50','2010-08-23 03:24:50'),('U3cff1c5c0','d3d0cfbc2e6adbd23f3fbb5dcafbf606','2010-10-01 02:42:46','2010-10-01 02:42:46'),('U3db03759c','78994c482aeae767d66b2c3898e6d9a7','2010-05-09 20:35:16','2010-05-09 20:35:16'),('U3e87d7517','71fcb4997e71ef648e7debd4bd65cd47','2010-10-05 23:54:18','2 010-10-05 23:54:18'),('U43e29b1fc','305385bb43845d5e0cc4fde940e1ca9c','2010-09-20 11:46:54','2010-09-20 11:46:54'),('U444cd49d8','cc6fb959f1b5018aeefb7ebbb9984630','2010-05-12 07:21:47','2010-05-12 07:21:47'),('U45715a0de','60e34be2a35cd2a0f2e597b5163f728a','2010-10-01 02:02:22','2010-10-01 02:02:22'),('U45dbe6341','03702562dd62682a3a3d6a2de2506bd6','2010-05-09 17:54:17','2010-05-09 17:54:17'),('U463715273','04ab8e3c0671aa2c9b29e055bab8da39','2010-05-08 19:35:05','2010-05-08 19:35:05'),('U47c48c4bd','e4061c4fc9e4a07f3567b04c66d69eef','2010-05-09 19:59:07','2010-05-09 19:59:07'),('U48234910c','30c0a392d6ce2db03711ac3f86b046ee','2010-05-12 01:55:54','2010-05-12 01:55:54'),('U497afc648','ae75a2513d99acf88e40bab2642454c6','2010-05-08 19:30:18','2010-05-08 19:30:18'),('U4ab09c426','8dbe9db9085425803993bc211a48edaf','2010-10-01 21:37:29','2010-10-01 21:37:29'),('U4cdd94df9','9cbeeb470575330159dcef0c32e95e63','2010-10-03 01:05:42','2010-10-03 01:05:42'),('U4f9ae98af','c90f1e4bdcdc5 af17efd862168fd9521','2010-10-12 13:08:14','2010-10-12 13:08:14'),('U530a26801','4004fd4abc55b225e57741989b392ed0','2010-07-24 13:10:02','2010-07-24 13:10:02'),('U539963c3e','61ab0778e67580810a1faffacb04281a','2010-05-31 00:27:50','2010-05-31 00:27:50'),('U53d045021','06b6ab20db3ad7acf25e300db39b85d3','2010-06-09 23:12:26','2010-06-09 23:12:26'),('U56bb40fc6','ab5a8ac96e06c9b964efb89cb7b25522','2010-06-23 00:33:47','2010-06-23 00:33:47'),('U5a3c17694','376e3d1ea4f2a40c969cd5136e0b6709','2010-05-26 00:12:20','2010-05-26 00:12:20'),('U5cacd0959','1fcdc1558fba9e522f976fc839704da8','2010-10-11 17:46:01','2010-10-11 17:46:01'),('U5ccbbe61d','b16b0474f425d48cb4284e31c3ad6fd2','2010-10-23 21:13:48','2010-10-23 21:13:48'),('U5fcd4871c','4af1a85c656553f82432dd216d9a4b11','2010-06-24 21:20:11','2010-06-24 21:20:11'),('U618fde241','b9ca041a908ec9ea99edadcb9204ef3a','2010-05-08 19:36:03','2010-05-08 19:36:03'),('U62906be75','45fbdb4f3d8eac6c7449330832d9bb5f','2010-10-05 08:01:25','2010- 10-05 08:01:25'),('U636fca053','888cc6a6ba69b2ee44dcc2cd94fc06d8','2010-05-12 01:52:15','2010-05-12 01:52:15'),('U658793ef1','327f26ce49af6d5e341b8e822bb5ef81','2010-05-13 00:40:05','2010-05-13 00:40:05'),('U680fc5e0f','fa563b032856099d1c6f103333cfd72c','2010-05-08 19:37:01','2010-05-08 19:37:01'),('U6ca50b927','aa5096b6ea0b2bd1aab3d4798c44c4fe','2010-05-09 19:51:22','2010-05-09 19:51:22'),('U6cc9d3661','83955a3317e6a8a72165d0726889804b','2010-10-06 23:27:39','2010-10-06 23:27:39'),('U6cf3b4be9','edd3d2d9acbfe47188edb60f65268b8c','2010-05-12 00:30:26','2010-05-12 00:30:26'),('U6d321c457','852adbedaf473fa7b6f01965f0fe10ba','2010-09-18 14:03:04','2010-09-18 14:03:04'),('U6d8f5355d','d5812fd57c2cd7856d3bccd06ec2b6ba','2010-05-12 10:44:28','2010-05-12 10:44:28'),('U6f046622b','831a003706153d9a54301344ef3f78c4','2010-07-24 23:22:10','2010-07-24 23:22:10'),('U6f187eaa2','87b76df19533c0f4f977f33533658850','2010-09-12 01:01:36','2010-09-12 01:01:36'),('U6f2044637','bd8630e2d5542926e c4b785519ab2224','2010-05-12 08:56:35','2010-05-12 08:56:35'),('U702c142e7','50e607d307ec30d6b6e3047a05c3936a','2010-05-09 20:29:52','2010-05-09 20:29:52'),('U707fad461','7829f1c55f1c1653666a07b00f89d93e','2010-05-12 01:48:12','2010-05-12 01:48:12'),('U71d945382','e24c5c5919ba85e83554336563c70f0d','2010-05-10 22:13:05','2010-05-10 22:13:05'),('U7236438f9','a83a311070a58065a801f117b1747c76','2010-10-01 21:37:22','2010-10-01 21:37:22'),('U760295e46','4a21365f57f682b2d0021764ac951243','2010-05-13 01:19:25','2010-05-13 01:19:25'),('U77d5aef64','ede20c87369e2a08f7c8bc745cf9f1f4','2010-05-12 02:23:44','2010-05-12 02:23:44'),('U7ae8dfb79','79bb636f81b07b3b262639672a212a05','2010-05-12 01:14:42','2010-05-12 01:14:42'),('U7b87ae651','bab613a8c97c921e72e85f94e1dd3e36','2010-10-07 23:40:59','2010-10-07 23:40:59'),('U7d608dcd4','81b985ac254ceecdaaac1ff4f5e04a53','2010-05-10 10:07:50','2010-05-10 10:07:50'),('U7ee62fc81','f4f08b4c12cbc197dcd00062950d63f4','2010-05-12 02:26:20','2010-05-1 2 02:26:20'),('U80a762653','7c1a4b82cdd62504f672fd1e084d21da','2010-10-05 23:51:49','2010-10-05 23:51:49'),('U82c0d8bb1','c6072d7f2ea788ccd381458f990a537f','2010-09-23 15:54:19','2010-09-23 15:54:19'),('U82df0fc43','9f1701acadcecf47458f8ec59e5b4ccf','2010-05-13 21:58:22','2010-05-13 21:58:22'),('U832ad15df','f0a338292ca6191d7f1bf77c4dc0ed0b','2010-09-28 05:02:12','2010-09-28 05:02:12'),('U835961fff','1ada0f5e37784dd9e55fbfbc49e088c2','2010-05-09 20:18:06','2010-05-09 20:18:06'),('U83ab85c1b','44883dc3ff76a5f4661ba14127c7e94d','2010-05-08 19:57:33','2010-05-08 19:57:33'),('U855e8f47f','cc911ac2a2bc60e9cf3d7244019cbb37','2010-05-20 23:12:50','2010-05-20 23:12:50'),('U86299a24d','b1801a7075791eda4292a3caa74d8197','2010-09-22 23:33:24','2010-09-22 23:33:24'),('U8a85cbf01','e4d9e03c34c4f076c4cad3815fb3aceb','2010-10-21 06:53:02','2010-10-21 06:53:02'),('U8a8ab895d','bb477fd6d669c2e463739cc01d4baa0a','2010-05-12 02:32:43','2010-05-12 02:32:43'),('U8d59d045c','1a52be5734ca2c765af54 280e3cb6ad4','2010-10-01 01:53:50','2010-10-01 01:53:50'),('U8db42a714','aafffc7acd732b98608bf4d6525b6616','2010-05-08 19:30:45','2010-05-08 19:30:45'),('U909311f65','3155bb3bd8002319536d47c7e4221d08','2010-11-03 10:39:08','2010-11-03 10:39:08'),('U91357ac04','6f446a24ee2a68caf59e8fae4bfd7f26','2010-10-02 13:56:19','2010-10-02 13:56:19'),('U92dd41180','4483f035e129f27363547ed8ee006b26','2010-07-24 22:46:39','2010-07-24 22:46:39'),('U93328fdc4','63c15d1d5bf03a1348962f495e447743','2010-05-09 17:42:31','2010-05-09 17:42:31'),('U94998bf97','16b7f832a5ad8ec372998529542f9027','2010-09-20 18:53:34','2010-09-20 18:53:34'),('U9b306706c','b3e99360995cc9faad0eef2effd56008','2010-06-05 11:22:06','2010-06-05 11:22:06'),('U9b7b4d7ad','9834b8c4e051f05b9725a3f705ea3f82','2010-05-12 04:02:13','2010-05-12 04:02:13'),('U9b96081c1','43559ca0f91eb325442b2155999a0730','2010-07-31 22:42:05','2010-07-31 22:42:05'),('U9be5c652d','6c433d91adca094de3138cbab1ebae35','2010-05-08 17:04:05','2010-05-08 17 :04:05'),('U9c5119c02','b3059eeeaf1f9ed1a2b4ca3a7c82300c','2010-10-01 02:01:27','2010-10-01 02:01:27'),('U9d2026cfe','dd77f01570c1f3bc79cbd07f988e9d4b','2010-07-02 02:32:18','2010-07-02 02:32:18'),('Ua0fe52ce6','7e0246a25b0ed9d83d027d28f135f885','2010-05-12 01:41:46','2010-05-12 01:41:46'),('Ua17b802ea','0f70239d98944807ec20182fdf8d4904','2010-10-11 22:15:23','2010-10-11 22:15:23'),('Ua2d33ecf7','775d7ddaefe5c2cbfe52865af1a0e653','2010-05-10 09:53:39','2010-05-10 09:53:39'),('Ua663f0756','c693fb841b2fb89c110cadd5984e20b9','2010-05-12 06:47:25','2010-05-12 06:47:25'),('Uab8e34897','6452eb6d063e278c272e39b4428eb8b6','2010-05-10 21:37:38','2010-05-10 21:37:38'),('Uac487712c','4655bc00488eef5d32f8149b682f9328','2010-09-21 17:20:44','2010-09-21 17:20:44'),('Uaef8d99b1','23fc9a6707161ef690aeed7fe784762b','2010-08-14 15:21:10','2010-08-14 15:21:10'),('Ub0c4cfd3c','31db526f5ed70d7a50cce2b8de2e7536','2010-06-02 17:46:22','2010-06-02 17:46:22'),('Ub4199fa12','c1fcb0f02ffcb1606ec9f3944 4eb237f','2010-10-08 12:41:08','2010-10-08 12:41:08'),('Ub5752cc53','86bb47453a2d0ca9821d8e26d39f1884','2010-05-13 05:37:12','2010-05-13 05:37:12'),('Ub5c58b6be','5b5779bd40ccd83a3434b1236be2d479','2010-06-26 04:26:21','2010-06-26 04:26:21'),('Ub9a310e2a','aa28e556819c9cb91aaa8044fc7f7b06','2010-10-01 01:56:26','2010-10-01 01:56:26'),('Ubadbf7558','9df9ed41e8a68c2ea37a4ebd7b6eea4c','2010-05-12 02:23:29','2010-05-12 02:23:29'),('Ubb447ca40','279ab97b2fb42dc3c745ce46a7d30077','2010-09-18 14:03:59','2010-09-18 14:03:59'),('Ubbd31de5c','a59c3d04856c9df138c06d2c05490ca3','2010-05-08 19:43:48','2010-05-08 19:43:48'),('Uc12d9b351','bc8827efa951e067fbaa680e528c3a6d','2010-07-02 01:50:35','2010-07-02 01:50:35'),('Uc18025643','60bf8ca957363b7fcbd14a206e9ccfe8','2010-05-09 17:46:34','2010-05-09 17:46:34'),('Uc50e52674','82032eab1a5301a57a0790dca7c828c5','2010-05-08 19:37:15','2010-05-08 19:37:15'),('Uca72602cb','4115c2bc2c6f066fee510635cdd75cfb','2010-09-18 17:31:53','2010-09-18 17:31: 53'),('Uccccbde0a','2ec50514ff2296520761e3e68e9fd81f','2010-09-21 17:37:30','2010-09-21 17:37:30'),('Ucd924588a','180dfffc61d5bd1da891b9ae66f64244','2010-05-31 08:20:44','2010-05-31 08:20:44'),('Ucfae42d5b','41e8038aed347868d8cf273aba7ac4ef','2010-07-11 16:16:24','2010-07-11 16:16:24'),('Ud026db27d','c3732ee4a0cb883ab258268e081d9719','2010-06-02 07:30:04','2010-06-02 07:30:04'),('Ud32632b05','c1d1bb47081284cb55f94f30da0cfde8','2010-07-01 23:07:20','2010-07-01 23:07:20'),('Ud474bcd73','0fdcfbd07a893ffec59ff2c2790b7a7f','2010-05-10 06:37:02','2010-05-10 06:37:02'),('Ud686002bf','c9d2c5861bb324a8a25854971bc0ee15','2010-09-18 14:13:48','2010-09-18 14:13:48'),('Ud7ad8712e','c35615e736a54f3fb268ab740e880bd7','2010-07-03 01:00:41','2010-07-03 01:00:41'),('Ud80eac800','fa98ae8bdbb3670d27d9420567701ca1','2010-07-01 23:06:44','2010-07-01 23:06:44'),('Ude5101aea','5fe646e7054d3c0629f1cc9e9274e556','2010-05-12 03:06:45','2010-05-12 03:06:45'),('Udf0c7365d','eb2a37a4adf42c68a301473d1241b 12e','2010-10-01 21:37:57','2010-10-01 21:37:57'),('Ue0c7bba79','224b41bf03a468685538283684e627b3','2010-09-22 23:33:50','2010-09-22 23:33:50'),('Ue30d2e3da','880d2947aa1a2e7a263ab5d99751e81f','2010-05-13 20:18:16','2010-05-13 20:18:16'),('Ue46a98fbb','18488da5ab1c69aa577dade5fe94a6a6','2010-05-10 09:58:29','2010-05-10 09:58:29'),('Ue728341a1','989d496f775de9153d7fe2d06c18be50','2010-10-23 21:13:33','2010-10-23 21:13:33'),('Ue73ed1c70','f7a7aace601d2a5fa7ab3013363b0dac','2010-05-13 00:38:16','2010-05-13 00:38:16'),('Ue8a15b047','a56e3bdef2fed0b6cb56058df836a259','2010-05-09 20:05:05','2010-05-09 20:05:05'),('Uea36db2f7','2c2a795a15be6f90264f9e2443824106','2010-10-12 13:08:33','2010-10-12 13:08:33'),('Ued7c6b37f','76f92b02f70a6ac0b948571dcd57383c','2010-05-08 20:34:06','2010-05-08 20:34:06'),('Uee2327278','cac7b4be6bcc815aa3bb4ad2d275a3cc','2010-05-10 23:08:25','2010-05-10 23:08:25'),('Uef2ec541a','20232508e7f5b037e55029c2565d3fef','2010-06-02 00:10:38','2010-06-02 00:10:38') ,('Uf09cf742a','80fa5e93c69ca442f3f5190214f585b4','2010-10-11 22:16:04','2010-10-11 22:16:04'),('Uf1cee9840','eea802699a5a81cd537c6898282f3753','2010-05-12 02:18:12','2010-05-12 02:18:12'),('Uf23e58a24','94a10d050fa0e4737aff9a60ca0f87c0','2010-05-12 01:45:05','2010-05-12 01:45:05'),('Uf4b0e06e2','c2fe0f859a44c834485aca7bbe616b8d','2010-07-24 13:09:39','2010-07-24 13:09:39'),('Uf4d1187c6','41489cf0d193754c17260c9956263998','2010-05-12 02:11:29','2010-05-12 02:11:29'),('Uf7b146095','e5e5890ff911b5fe06df12b74deae3bf','2010-05-12 06:35:59','2010-05-12 06:35:59'),('Uf85c12875','888e76c7dc45e49803e1ac2bf96ef5c9','2010-09-14 12:48:52','2010-09-14 12:48:52'),('Uf97f64209','4975c817f291dd11beba47b5a5a9405a','2010-09-18 14:00:41','2010-09-18 14:00:41'),('Ufbc370dc6','cdd1878b0dc17d62158debc2878df005','2010-05-20 23:07:50','2010-05-20 23:07:50'),('Ufc48316c6','736a0ef470d530819aac1bbafad6fefc','2010-10-08 13:44:13','2010-10-08 13:44:13'),('Ufcde30624','ef10d4e00ccb368f4de15fbe82a531e7' ,'2010-06-29 22:42:12','2010-06-29 22:42:12'),('Ufd75e5be5','9c44b8073419bdef8332bc3e5f042667','2010-10-07 12:54:37','2010-10-07 12:54:37'); +/*!40000 ALTER TABLE `t_login` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t_map` +-- + +DROP TABLE IF EXISTS `t_map`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_map` ( + `mapID` smallint(5) unsigned NOT NULL, + `mapName` varchar(40) DEFAULT NULL, + `mapExplanation` varchar(100) DEFAULT NULL, + `mapComponent` varchar(1000) DEFAULT NULL, + `lastUpdateDate` varchar(45) DEFAULT NULL, + PRIMARY KEY (`mapID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_map` +-- + +LOCK TABLES `t_map` WRITE; +/*!40000 ALTER TABLE `t_map` DISABLE KEYS */; +INSERT INTO `t_map` VALUES (1,'夷éµæ¦','','1111111111111111111111111111111111114441111111111111161111111111111111111111111111111111111111114441111111111111166111111111111111111111111111111111111111114441111111111111111111111111111111111111111111111111111111114441111111111111111111111111111111111111111111111111111111114441111111111111111111111111111111111111111111111111111111114441111111111111111111111111111111111111111111111111111111114441111111111111111111111111111111111111111111111111111111144411111111111111111111111111111111111111111111111111111111144411111111111111111111111111111111111111111411111111111111144411111111111111111111111111111111111111114411111111111111144411111111111111111111111111111111111111114111111111111111144411111111111111111111111111111111111111144111111111111111144411111111111111111111111111111111111111144111111111111111444111111111111111111111111111111111111111144111111111111111444111111111111111111111111111111111111111141111111111111111444111111 111111111111111111111111111111111441111111111111114441111','2010-05-02 02:01:38'),(2,'åè¥æ¦','','333333666333333333338883333333338333333333332333333333333333333333666333333333333388833333338333333333332333333333333333333333366333333333333333888333338333333333332333333333333333333333366333333333333333338883338333333333322333333333333333333333333333333333333333333388838333333333322333333333333333333333333333333333333333333333888333333333322333333333333333633333333333333333333333333333338833333333322333333333333333633333333333333333333333333333333833333333322333333333333333333333322233333333322233333333333833333333322333333333333333333333222222333333222233333333333833333333322333333333333333333333322222333333222333333333333833333333222333333333333388333333333323333373333333333333333833333333222333333888888883333333333333333333333333333333333833333332888888888833333333333333333333333333333333333333333833333338823333333333333333333333333333333333333333333333333833333888223333 3333333333333332222333333333333333333333333338333338322333333333333333333332223333333333333333333333333338888888','2010-05-02 02:01:38'),(3,'é½å¹³é¢æ¦','','11111111331111111111111111111111111111111111111111111113311111111111311111111111111111111111111111111111111111111111311111111111311111111111111111111111111111111111111111111111331111111113311111111111111111111111111111111111111111111111133111111113111111111111111111111111111111111111111111111111113111111113111111111111111111111111111111111111111111111111113311111113111111111111111111111111111111111111111111111111111311111113111111111111111111111111111111111111111111111111111311111111111111111111111111111111111111111111111311111111111311111111111111111111131111111111111111111111111311111111111311111111111111111111131111111111111111111111113311111111111311111111111111111111131111111111111111111111113111111111111311111111111111111111331111111111111111111111113222222222222311111111111111111111311111111111111111122222233222 22222222231111111111111111111131112222211111111222222233222222222222231111111222222222111132222222222221122222222332222222222222231111112222222222255232222222222222222222','2010-05-02 02:01:38'); +/*!40000 ALTER TABLE `t_map` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t_room` +-- + +DROP TABLE IF EXISTS `t_room`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_room` ( + `roomID` smallint(5) unsigned NOT NULL, + `roomName` varchar(40) DEFAULT NULL, + `roomStatus` tinyint(3) unsigned DEFAULT NULL, + `offenseCountry` smallint(5) unsigned DEFAULT NULL, + `defenseCountry` smallint(5) unsigned DEFAULT NULL, + `mapID` smallint(5) unsigned DEFAULT NULL, + `maxTurnCount` smallint(5) unsigned DEFAULT NULL, + `turnCount` smallint(5) unsigned DEFAULT NULL, + `lastUpdateDate` datetime DEFAULT NULL, + PRIMARY KEY (`roomID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_room` +-- + +LOCK TABLES `t_room` WRITE; +/*!40000 ALTER TABLE `t_room` DISABLE KEYS */; +INSERT INTO `t_room` VALUES (1,'夷éµ',2,1,2,1,60,0,'2010-10-26 06:59:01'),(2,'夷éµ',2,1,3,1,60,0,'2010-11-03 15:00:01'),(3,'åè¥',2,2,1,2,60,0,'2010-10-08 04:31:01'),(4,'åè¥',2,2,3,2,60,0,'2010-10-12 02:40:02'),(5,'é½å¹³é¢',2,3,2,3,60,0,'2010-10-12 02:37:01'); +/*!40000 ALTER TABLE `t_room` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t_turnTimer` +-- + +DROP TABLE IF EXISTS `t_turnTimer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_turnTimer` ( + `roomID` smallint(5) unsigned DEFAULT NULL, + `receiptTime` datetime DEFAULT NULL, + `turnInterval` int(11) DEFAULT NULL, + `gameInterval` int(11) DEFAULT NULL, + `timerStatus` smallint(5) unsigned DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_turnTimer` +-- + +LOCK TABLES `t_turnTimer` WRITE; +/*!40000 ALTER TABLE `t_turnTimer` DISABLE KEYS */; +INSERT INTO `t_turnTimer` VALUES (1,'2010-10-26 06:59:01',180,300,0),(2,'2010-11-03 15:00:02',180,300,0),(3,'2010-10-08 04:31:01',180,300,0),(4,'2010-10-12 02:40:02',180,300,0),(5,'2010-10-12 02:37:01',180,300,0); +/*!40000 ALTER TABLE `t_turnTimer` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t_user` +-- + +DROP TABLE IF EXISTS `t_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_user` ( + `userID` varchar(10) NOT NULL, + `twitterID` varchar(40) DEFAULT NULL, + `userName` varchar(40) DEFAULT NULL, + `twitterToken` varchar(40) DEFAULT NULL, + `country` smallint(5) unsigned DEFAULT NULL, + `paramID` smallint(5) unsigned DEFAULT NULL, + `lastUpdateDate` datetime DEFAULT NULL, + PRIMARY KEY (`userID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_user` +-- + +LOCK TABLES `t_user` WRITE; +/*!40000 ALTER TABLE `t_user` DISABLE KEYS */; +INSERT INTO `t_user` VALUES ('0af5f8de42',NULL,'',NULL,NULL,NULL,'2010-05-05 20:51:25'),('37ac5d6b0d',NULL,'abcdefg',NULL,NULL,NULL,'2010-05-05 20:45:12'),('3aef5d0e7e',NULL,'ããããã',NULL,NULL,NULL,'2010-05-05 20:57:42'),('3f84dc5de6',NULL,'zxxxx',NULL,NULL,NULL,'2010-05-05 22:06:57'),('41967a8ac5',NULL,'d',NULL,NULL,NULL,'2010-05-02 22:09:44'),('4a02f8fff3',NULL,'e',NULL,NULL,NULL,'2010-05-02 22:23:36'),('83bfee2209',NULL,'',NULL,NULL,NULL,'2010-05-02 22:24:06'),('928b4b3e82',NULL,'',NULL,NULL,NULL,'2010-05-05 20:43:34'),('948c0971bf',NULL,'\\\'',NULL,NULL,NULL,'2010-05-05 20:45:54'),('9e057cf47e',NULL,'',NULL,NULL,NULL,'2010-05-05 20:55:03'),('b266f8f283',NULL,'ccccccc',NULL,NULL,NULL,'2010-05-05 21:20:23'),('da73eceb9d',NULL,'b',NULL,NULL,NULL,'2010-05-02 21:52:15'),('dd215e93af',NULL,'a',NULL,NULL,NULL,'2010-05-02 22:44:59'),('e20ceab73e',NULL,'c',NULL,NULL,NULL,'2010-05-02 21:54:45'),('U0143b5eaa',NULL,'Uee2327278',NULL,1,164,'2010-05-12 01:39:10'),('U02536abdc ',NULL,'ak3_test3',NULL,2,164,'2010-05-12 03:38:05'),('U0260be6f9',NULL,'tttttt',NULL,1,164,'2010-06-22 01:37:18'),('U02de1eda6',NULL,'ãã»ã»ã®ã»',NULL,2,164,'2010-06-02 23:19:17'),('U035514ce8',NULL,'000009',NULL,1,164,'2010-05-08 19:40:02'),('U0510488ed',NULL,'test007',NULL,3,164,'2010-05-10 09:24:40'),('U07d2e9cd2',NULL,'å',NULL,2,164,'2010-09-22 23:35:22'),('U07fb00210',NULL,'ist 101',NULL,3,164,'2010-05-12 09:05:15'),('U0b8206c6e',NULL,'hononohoh',NULL,2,164,'2010-10-05 23:54:55'),('U0db742293',NULL,'test009',NULL,1,164,'2010-05-10 09:54:44'),('U0ffa91522',NULL,'shinrai',NULL,3,164,'2010-09-10 23:57:11'),('U102a015a9',NULL,'Demo player 2',NULL,3,164,'2010-06-24 23:41:24'),('U10728c8da',NULL,'ak_12345678',NULL,1,164,'2010-10-01 21:37:40'),('U108c2da78',NULL,'AA',NULL,2,164,'2010-06-22 01:48:01'),('U12d7cb916',NULL,'å²',NULL,3,164,'2010-09-22 23:34:35'),('U137417190',NULL,'rossi_',NULL,2,164,'2010-10-01 01:55:28'),('U1927eccd1',NULL,'test',NULL,2,164,'2010-05-10 2 2:34:27'),('U23ce4fe74',NULL,'rossi3',NULL,2,164,'2010-07-01 23:43:57'),('U265f6d781',NULL,'ma_6',NULL,3,164,'2010-05-13 23:19:00'),('U28cfcc1b9',NULL,'ã¦ãã',NULL,1,164,'2010-05-11 23:07:14'),('U2a666421e',NULL,'ã¿ã«',NULL,3,164,'2010-10-08 12:41:35'),('U2b0f32a9d',NULL,'000005',NULL,2,164,'2010-05-08 19:35:24'),('U2d6e34d0c',NULL,'ã¬ã ',NULL,2,164,'2010-09-22 23:34:50'),('U308f7a20e',NULL,'000002',NULL,3,164,'2010-05-08 19:30:40'),('U31519e2a3',NULL,'ã²ãã',NULL,1,164,'2010-05-25 22:51:11'),('U3274f4fc3',NULL,'rossi2',NULL,2,164,'2010-07-01 23:12:25'),('U32e997c8e',NULL,'ma_11',NULL,1,164,'2010-05-22 23:54:02'),('U3745c6424',NULL,'ak3_test',NULL,1,164,'2010-05-12 03:01:22'),('U385674d53',NULL,'IS01',NULL,2,164,'2010-08-04 01:01:40'),('U391f182a6',NULL,'narunaru235',NULL,1,164,'2010-10-05 23:46:02'),('U39865d82b',NULL,'ãã ã',NULL,1,164,'2010-09-18 14:16:28'),('U39f2b20aa',NULL,'aaa',NULL,3,164,'2010-05-11 01:32:30'),('U3cdc73c40',NULL,'ak-test',NULL,3,164,' 2010-08-23 03:24:48'),('U3cff1c5c0',NULL,'narunaru512234',NULL,3,164,'2010-10-01 02:42:41'),('U3db03759c',NULL,'test005',NULL,2,164,'2010-05-09 20:35:16'),('U3e87d7517',NULL,'teltelte122',NULL,3,164,'2010-10-05 23:54:14'),('U43e29b1fc',NULL,'hikki',NULL,2,164,'2010-09-20 11:46:53'),('U444cd49d8',NULL,'ma_1',NULL,1,164,'2010-05-12 07:21:41'),('U45715a0de',NULL,'narunaru51223!',NULL,2,164,'2010-10-01 02:02:22'),('U45dbe6341',NULL,'xxx0003',NULL,1,164,'2010-05-09 17:49:48'),('U463715273',NULL,'000004',NULL,1,164,'2010-05-08 19:35:05'),('U47c48c4bd',NULL,'test002',NULL,1,164,'2010-05-09 19:59:07'),('U497afc648',NULL,'000001',NULL,1,164,'2010-05-08 19:30:18'),('U4ab09c426',NULL,'ak_12345',NULL,3,164,'2010-10-01 21:37:29'),('U4cdd94df9',NULL,'è¶å³',NULL,2,164,'2010-10-03 01:05:30'),('U4f9ae98af',NULL,'ãã¬ã',NULL,2,164,'2010-10-12 13:08:14'),('U530a26801',NULL,'yyy',NULL,3,164,'2010-07-24 13:09:59'),('U539963c3e',NULL,'moo_twit',NULL,3,164,'2010-05-31 00:27:50'),('U53d045021 ',NULL,'tenki',NULL,3,164,'2010-06-09 23:12:05'),('U56bb40fc6',NULL,'nnn',NULL,3,164,'2010-06-23 00:33:45'),('U5a3c17694',NULL,'ããã²ããã',NULL,2,164,'2010-05-26 00:12:13'),('U5cacd0959',NULL,'ããªã',NULL,2,164,'2010-10-11 17:45:54'),('U5ccbbe61d',NULL,'ãã',NULL,1,164,'2010-10-23 21:13:42'),('U5fcd4871c',NULL,'Demo player',NULL,1,164,'2010-06-24 21:20:07'),('U618fde241',NULL,'000006',NULL,3,164,'2010-05-08 19:36:03'),('U62906be75',NULL,'toyo',NULL,1,164,'2010-10-05 08:00:40'),('U658793ef1',NULL,'ma_3',NULL,2,164,'2010-05-13 00:40:03'),('U680fc5e0f',NULL,'000007',NULL,2,164,'2010-05-08 19:37:01'),('U6ca50b927',NULL,'test001',NULL,3,164,'2010-05-09 19:51:22'),('U6cc9d3661',NULL,'testooooooo',NULL,3,164,'2010-10-06 23:27:36'),('U6cf3b4be9',NULL,'aaaa',NULL,2,164,'2010-05-12 00:30:26'),('U6d321c457',NULL,'ããã¨',NULL,1,164,'2010-09-18 14:02:41'),('U6d8f5355d',NULL,'ak3_test1',NULL,1,164,'2010-05-12 10:44:26'),('U6f046622b',NULL,'è£ä¹ã§ã¼ã',NULL,3,164,' 2010-07-24 23:22:02'),('U6f187eaa2',NULL,'ãã¹ã',NULL,1,164,'2010-09-12 01:01:31'),('U6f2044637',NULL,'ist_001',NULL,3,164,'2010-05-12 08:56:24'),('U702c142e7',NULL,'test004',NULL,1,164,'2010-05-09 20:29:51'),('U707fad461',NULL,'test013',NULL,3,164,'2010-05-12 01:48:12'),('U71d945382',NULL,'ãã£ã',NULL,3,164,'2010-05-10 22:12:50'),('U7236438f9',NULL,'ak_1234567890',NULL,3,164,'2010-10-01 21:37:12'),('U760295e46',NULL,'ma_5',NULL,1,164,'2010-05-13 01:19:23'),('U7ae8dfb79',NULL,'qqq',NULL,2,164,'2010-05-12 01:14:42'),('U7b87ae651',NULL,'momomoo',NULL,3,164,'2010-10-07 23:40:55'),('U7bd5r6a2d',NULL,'taka8',NULL,1,164,'2010-05-09 15:08:09'),('U7d608dcd4',NULL,'test011',NULL,2,164,'2010-05-10 10:07:50'),('U7ebaf5c0b',NULL,'aaat',NULL,2,164,'2010-05-11 01:32:48'),('U80a762653',NULL,'narunaru2345',NULL,3,164,'2010-10-05 23:51:46'),('U82c0d8bb1',NULL,'regoris ',NULL,3,164,'2010-09-23 15:54:13'),('U82df0fc43',NULL,'ãããããª',NULL,1,164,'2010-05-13 21:58:10'),('U832ad15 df',NULL,'ãããã',NULL,2,164,'2010-09-28 05:02:00'),('U835961fff',NULL,'test003',NULL,2,164,'2010-05-09 20:18:06'),('U83ab85c1b',NULL,'000012',NULL,3,164,'2010-05-08 19:57:33'),('U855e8f47f',NULL,'shige',NULL,3,164,'2010-05-20 23:12:49'),('U86299a24d',NULL,'ç',NULL,1,164,'2010-09-22 23:33:20'),('U8a85cbf01',NULL,'TK',NULL,1,164,'2010-10-21 06:53:02'),('U8d59d045c',NULL,'narunaru23',NULL,2,164,'2010-10-01 01:53:50'),('U8db42a714',NULL,'000003',NULL,1,164,'2010-05-08 19:30:45'),('U909311f65',NULL,'WA',NULL,3,164,'2010-11-03 10:39:02'),('U91357ac04',NULL,'ããªã¯ã¾ãã',NULL,3,164,'2010-10-02 13:56:16'),('U92dd41180',NULL,'nihongoutenai',NULL,2,164,'2010-07-24 22:46:36'),('U93328fdc4',NULL,'xxx0001',NULL,2,164,'2010-05-09 17:42:31'),('U94998bf97',NULL,'ã¯ããã¡',NULL,3,164,'2010-09-20 18:52:05'),('U9b306706c',NULL,'hohoho',NULL,1,164,'2010-06-05 11:22:03'),('U9b7b4d7ad',NULL,' ak3_tests',NULL,2,164,'2010-05-12 04:02:11'),('U9b96081c1',NULL,'ãã',NULL,1,164,' 2010-07-31 22:42:01'),('U9be5c652d',NULL,'aaaaaaaaaa',NULL,NULL,1,'2010-05-08 17:04:05'),('U9c5119c02',NULL,'ãããããªã¯ã¾ããã',NULL,3,164,'2010-10-01 02:01:25'),('U9d2026cfe',NULL,'Anknown',NULL,1,164,'2010-07-02 02:31:12'),('Ua0fe52ce6',NULL,'Ue',NULL,2,164,'2010-05-12 01:41:46'),('Ua17b802ea',NULL,'ã¢ãã«ã',NULL,2,164,'2010-10-11 22:15:23'),('Ua2d33ecf7',NULL,'test008',NULL,3,164,'2010-05-10 09:53:39'),('Ua663f0756',NULL,'è£ä¹',NULL,1,164,'2010-05-12 06:47:25'),('Uab8e34897',NULL,'non',NULL,3,164,'2010-05-10 21:37:32'),('Uac487712c',NULL,'tyamaz ',NULL,1,164,'2010-09-21 17:20:44'),('Uaef8d99b1',NULL,'ããããã',NULL,1,164,'2010-08-14 15:21:08'),('Ub0c4cfd3c',NULL,'ãã¢\n',NULL,3,164,'2010-06-02 17:46:18'),('Ub4199fa12',NULL,'Taka',NULL,2,164,'2010-10-08 12:41:08'),('Ub5752cc53',NULL,'test_102',NULL,3,164,'2010-05-13 05:37:09'),('Ub5c58b6be',NULL,'taro',NULL,2,164,'2010-06-26 04:26:04'),('Ub9a310e2a',NULL,'narunaru51223',NULL,1,164,'2010-10-01 0 1:55:57'),('Ubadbf7558',NULL,'Uee23454323',NULL,2,164,'2010-05-12 02:23:29'),('Ubb447ca40',NULL,'oritoy',NULL,3,164,'2010-09-18 14:03:40'),('Ubbd31de5c',NULL,'000011',NULL,3,164,'2010-05-08 19:43:48'),('Uc12d9b351',NULL,'testes',NULL,3,164,'2010-07-02 01:49:32'),('Uc18025643',NULL,'xxx0002',NULL,1,164,'2010-05-09 17:46:34'),('Uc50e52674',NULL,'000008',NULL,3,164,'2010-05-08 19:37:15'),('Uca72602cb',NULL,'æ¿å¿ã£ã',NULL,2,164,'2010-09-18 17:31:53'),('Uccccbde0a',NULL,'ãããã',NULL,1,164,'2010-09-21 17:37:30'),('Ucd924588a',NULL,'okotaneko',NULL,3,164,'2010-05-31 08:20:44'),('Ucfae42d5b',NULL,'ã¸ããã',NULL,1,164,'2010-07-11 16:16:19'),('Ud026db27d',NULL,'futatan ',NULL,1,164,'2010-06-02 07:29:59'),('Ud32632b05',NULL,'rossijp',NULL,1,164,'2010-07-01 23:07:15'),('Ud474bcd73',NULL,'test006',NULL,1,164,'2010-05-10 06:37:02'),('Ud686002bf',NULL,'ç½èµ·',NULL,3,164,'2010-09-18 14:10:11'),('Ud7ad8712e',NULL,'ankown1',NULL,1,164,'2010-07-03 01:00:39'),('Ud80eac800',NUL L,'rossi',NULL,3,164,'2010-07-01 23:06:44'),('Ude5101aea',NULL,'ak3_test2',NULL,1,164,'2010-05-12 03:06:19'),('Udf0c7365d',NULL,'ak_123',NULL,2,164,'2010-10-01 21:37:56'),('Ue0c7bba79',NULL,'ä½ä¹ ',NULL,1,164,'2010-09-22 23:33:50'),('Ue30d2e3da',NULL,'ã²ããã',NULL,3,164,'2010-05-13 20:18:12'),('Ue46a98fbb',NULL,'test010',NULL,1,164,'2010-05-10 09:58:29'),('Ue728341a1',NULL,'ã',NULL,2,164,'2010-10-23 21:13:33'),('Ue73ed1c70',NULL,'ma_2',NULL,2,164,'2010-05-13 00:38:14'),('Ue8a15b047',NULL,'xxx0004',NULL,3,164,'2010-05-09 20:03:15'),('Uea36db2f7',NULL,'ãã¬ã\n',NULL,3,164,'2010-10-12 13:08:19'),('Ued7c6b37f',NULL,'000010',NULL,2,164,'2010-05-08 19:40:28'),('Uee2327278',NULL,'akifumi3_test',NULL,3,164,'2010-05-10 23:08:17'),('Uef2ec541a',NULL,'ã²ããã',NULL,3,164,'2010-06-02 00:10:32'),('Uf09cf742a',NULL,'ã¢ãã«ã\n',NULL,3,164,'2010-10-11 22:15:07'),('Uf1cee9840',NULL,'123345678900',NULL,1,164,'2010-05-12 02:18:12'),('Uf23e58a24',NULL,'ttttt',NULL,2,164,' 2010-05-12 01:45:05'),('Uf4b0e06e2',NULL,'uuii\n',NULL,3,164,'2010-07-24 13:09:39'),('Uf7b146095',NULL,'hiroyuki',NULL,2,164,'2010-05-12 06:35:59'),('Uf85c12875',NULL,'moon',NULL,2,164,'2010-09-14 12:48:34'),('Uf97f64209',NULL,'ktsugita',NULL,3,164,'2010-09-18 14:00:17'),('Ufbc370dc6',NULL,'shige0501',NULL,3,164,'2010-05-20 23:07:50'),('Ufbcf6bfcc',NULL,'test 012',NULL,1,164,'2010-05-11 01:40:54'),('Ufc48316c6',NULL,'hoge',NULL,2,164,'2010-10-08 13:44:06'),('Ufcde30624',NULL,'ankown',NULL,1,164,'2010-06-29 22:27:30'),('Ufd75e5be5',NULL,'ãã¼ãã',NULL,2,164,'2010-10-07 12:54:14'); +/*!40000 ALTER TABLE `t_user` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t_userAction` +-- + +DROP TABLE IF EXISTS `t_userAction`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_userAction` ( + `userID` varchar(10) NOT NULL, + `roomID` smallint(5) unsigned DEFAULT NULL, + `moveMapChipNo` smallint(5) unsigned DEFAULT NULL, + `battleCommandID` smallint(5) unsigned DEFAULT NULL, + `battleMapChipNo` smallint(5) unsigned DEFAULT NULL, + `lastUpdateDate` datetime DEFAULT NULL, + PRIMARY KEY (`userID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_userAction` +-- + +LOCK TABLES `t_userAction` WRITE; +/*!40000 ALTER TABLE `t_userAction` DISABLE KEYS */; +/*!40000 ALTER TABLE `t_userAction` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t_userStatus` +-- + +DROP TABLE IF EXISTS `t_userStatus`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_userStatus` ( + `userID` varchar(10) NOT NULL, + `win` int(10) unsigned DEFAULT NULL, + `lost` int(10) unsigned DEFAULT NULL, + `lastUpdateDate` datetime DEFAULT NULL, + PRIMARY KEY (`userID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t_userStatus` +-- + +LOCK TABLES `t_userStatus` WRITE; +/*!40000 ALTER TABLE `t_userStatus` DISABLE KEYS */; +INSERT INTO `t_userStatus` VALUES ('U0260be6f9',0,0,'2010-06-22 01:37:19'),('U02de1eda6',0,0,'2010-06-02 23:19:17'),('U07d2e9cd2',0,0,'2010-09-22 23:35:22'),('U0b8206c6e',0,0,'2010-10-05 23:54:55'),('U0ffa91522',0,0,'2010-09-10 23:57:11'),('U102a015a9',0,0,'2010-06-24 23:41:24'),('U10728c8da',0,0,'2010-10-01 21:37:40'),('U108c2da78',0,0,'2010-06-22 01:48:01'),('U12d7cb916',0,0,'2010-09-22 23:34:35'),('U137417190',0,0,'2010-10-01 01:55:28'),('U23ce4fe74',0,0,'2010-07-01 23:43:57'),('U2a666421e',0,0,'2010-10-08 12:41:35'),('U2d6e34d0c',0,0,'2010-09-22 23:34:50'),('U31519e2a3',0,0,'2010-05-25 22:51:11'),('U3274f4fc3',0,0,'2010-07-01 23:12:25'),('U32e997c8e',0,0,'2010-05-22 23:54:02'),('U385674d53',0,0,'2010-08-04 01:01:40'),('U391f182a6',0,0,'2010-10-05 23:46:02'),('U39865d82b',0,0,'2010-09-18 14:16:28'),('U3cdc73c40',0,0,'2010-08-23 03:24:48'),('U3cff1c5c0',0,0,'2010-10-01 02:42:41'),('U3e87d7517',0,0,'2010-10-05 23:54:14'),('U43e29b1fc',0,0,'2010-09-20 11:46:54'),('U45715a0de ',0,0,'2010-10-01 02:02:22'),('U4ab09c426',0,0,'2010-10-01 21:37:29'),('U4cdd94df9',0,0,'2010-10-03 01:05:30'),('U4f9ae98af',0,0,'2010-10-12 13:08:14'),('U530a26801',0,0,'2010-07-24 13:09:59'),('U539963c3e',0,0,'2010-05-31 00:27:50'),('U53d045021',0,0,'2010-06-09 23:12:05'),('U56bb40fc6',0,0,'2010-06-23 00:33:45'),('U5a3c17694',0,0,'2010-05-26 00:12:13'),('U5cacd0959',0,0,'2010-10-11 17:45:54'),('U5ccbbe61d',0,0,'2010-10-23 21:13:42'),('U5fcd4871c',0,0,'2010-06-24 21:20:07'),('U62906be75',0,0,'2010-10-05 08:00:40'),('U6cc9d3661',0,0,'2010-10-06 23:27:36'),('U6d321c457',0,0,'2010-09-18 14:02:41'),('U6f046622b',0,0,'2010-07-24 23:22:03'),('U6f187eaa2',0,0,'2010-09-12 01:01:31'),('U7236438f9',0,0,'2010-10-01 21:37:12'),('U7b87ae651',0,0,'2010-10-07 23:40:55'),('U80a762653',0,0,'2010-10-05 23:51:46'),('U82c0d8bb1',0,0,'2010-09-23 15:54:13'),('U832ad15df',0,0,'2010-09-28 05:02:00'),('U855e8f47f',0,0,'2010-05-20 23:12:49'),('U86299a24d',0,0,'2010-09-22 23:33:20'),('U8a85cbf01',0,0 ,'2010-10-21 06:53:02'),('U8d59d045c',0,0,'2010-10-01 01:53:50'),('U909311f65',0,0,'2010-11-03 10:39:02'),('U91357ac04',0,0,'2010-10-02 13:56:16'),('U92dd41180',0,0,'2010-07-24 22:46:36'),('U94998bf97',0,0,'2010-09-20 18:52:05'),('U9b306706c',0,0,'2010-06-05 11:22:03'),('U9b96081c1',0,0,'2010-07-31 22:42:01'),('U9c5119c02',0,0,'2010-10-01 02:01:25'),('U9d2026cfe',0,0,'2010-07-02 02:31:12'),('Ua17b802ea',0,0,'2010-10-11 22:15:23'),('Uac487712c',0,0,'2010-09-21 17:20:44'),('Uaef8d99b1',0,0,'2010-08-14 15:21:08'),('Ub0c4cfd3c',0,0,'2010-06-02 17:46:18'),('Ub4199fa12',0,0,'2010-10-08 12:41:08'),('Ub5c58b6be',0,0,'2010-06-26 04:26:04'),('Ub9a310e2a',0,0,'2010-10-01 01:55:57'),('Ubb447ca40',0,0,'2010-09-18 14:03:40'),('Uc12d9b351',0,0,'2010-07-02 01:49:32'),('Uca72602cb',0,0,'2010-09-18 17:31:53'),('Uccccbde0a',0,0,'2010-09-21 17:37:30'),('Ucd924588a',0,0,'2010-05-31 08:20:44'),('Ucfae42d5b',0,0,'2010-07-11 16:16:19'),('Ud026db27d',0,0,'2010-06-02 07:29:59'),('Ud32632b05',0,0,'201 0-07-01 23:07:15'),('Ud686002bf',0,0,'2010-09-18 14:10:11'),('Ud7ad8712e',0,0,'2010-07-03 01:00:39'),('Ud80eac800',0,0,'2010-07-01 23:06:44'),('Udf0c7365d',0,0,'2010-10-01 21:37:56'),('Ue0c7bba79',0,0,'2010-09-22 23:33:50'),('Ue728341a1',0,0,'2010-10-23 21:13:33'),('Uea36db2f7',0,0,'2010-10-12 13:08:19'),('Uef2ec541a',0,0,'2010-06-02 00:10:32'),('Uf09cf742a',0,0,'2010-10-11 22:15:07'),('Uf4b0e06e2',0,0,'2010-07-24 13:09:39'),('Uf85c12875',0,0,'2010-09-14 12:48:35'),('Uf97f64209',0,0,'2010-09-18 14:00:17'),('Ufbc370dc6',0,0,'2010-05-20 23:07:50'),('Ufc48316c6',0,0,'2010-10-08 13:44:06'),('Ufcde30624',0,0,'2010-06-29 22:27:30'),('Ufd75e5be5',0,0,'2010-10-07 12:54:14'); +/*!40000 ALTER TABLE `t_userStatus` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2010-11-06 0:02:41 Added: tags/Ver.0.1.5/Server/SQL/grantSQL.txt =================================================================== --- tags/Ver.0.1.5/Server/SQL/grantSQL.txt (rev 0) +++ tags/Ver.0.1.5/Server/SQL/grantSQL.txt 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,4 @@ + +GRANT SELECT,INSERT,UPDATE,DELETE ON o_sangokushi.* TO phpuser @ localhost IDENTIFIED BY 'password'; +set password for phpuser @ localhost=password('password'); + Added: tags/Ver.0.1.5/Server/Ver.0.1.5.tar.gz =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/Server/Ver.0.1.5.tar.gz ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/Server/server_php/AI.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/AI.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/AI.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,156 @@ +<?php + + require('dbutil.php'); + + define('DEFENCE_AREA', 600); + define('MAP_MAX', 3600); + define('MAP_UP', -60); + define('MAP_DOWN', 60); + define('MAP_LEFT', -1); + define('MAP_RIGHT', +1); + define('MAP_LEFTUP', -61); + define('MAP_RIGHTUP', -59); + define('MAP_LEFTDOWN', 59); + define('MAP_RIGHTDOWN', 61); + + function aiAction($roomid){ + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + // å¦ç対象AIåå¾ + $sql = 'select userID, countryID, mapChipNo, charKbn from t_battle where roomID=:roomID and charKbn<>:charKbn and exclusionKbn=0'; + $param = array(":roomID" => "$roomid", ":charKbn" => 'U'); + + $result = $session->query_select($sql, $param); + + // ç·å¤§å°ä½ç½®åå¾ + $sql = 'select countryID, mapChipNo from t_battle where roomID=:roomID and charKbn:=charKbn'; + $param = array(":roomID" => "$roomID", ":charKbn" => "S"); + $king = $session->query_select($sql, $param); + + foreach($result as $row) { + + $userID = $result[0]; + $countryID = $result[1]; + $mapChipNo = $result[2]; + $charKgn = $result[3]; + + // è¿ãã«æµãããå ´åãæ»æ + $sql = 'select mapChipNo from t_battle where roomID=:roomID and countryID<>:countryID and mapChipNo in (:map1, :map2, map3, map4, map5, map6, map7, map8) order by power'; + $param = array(":roomID" => "$roomID", ":countryID" => "$countryID", + ":map1" => $mapChipNo + MAP_LEFTUP, ":map2" => $mapChipNo + MAP_UP, ":map3" => $mapChipNo + MAP_RIGHTUP, + ":map4" => $mapChipNo + MAP_LEFT, ":map5" => $mapChipNo + MAP_RIGHT, ":map6" => $mapChipNo + MAP_LEFTDOWN, + ":map7" => $mapChipNo + MAP_DOWN, ":map8" => $mapChipNo + MAP_RIGHTDOWN); + + $result = $session->query_select($sql, $param); + + if (!empty($result)){ + + $battleCommandID = 1; + + $sql_insert_uaction = 'insert into t_userAction (userID, roomID, battleCommandID, battleMapChipNo, lastUpdateDate) values (:userID, :roomID, :battleCommandID, :battleMapChipNo, now())'; + $param_insert_uaction = array(":userID" => "$userID", ":roomID" => "$roomid", ":battleCommandID" => "$battleCommandID", ":battleMapChipNo" => " $result[0][0]"); + + $result_insert_uaction = $session->query_update($sql_insert_uaction, $param_insert_uaction); + + } elseif ($charKgn == 'B') { + // æ¦å°ã®ã¿ã®è¡å ã¨ãããããIDãå¥æ°ãæ»æåãå¶æ°ãå®ååã« + if(($useID % 2) == 1){ + // æ»æå + // æµå½ã®ç·å¤§å°ã®ããããããNoåå¾ + if($king[0][0] <> $countryID){ + + $targetmapchipno = $king[0][1]; + + } else { + + $targetmapchipno = $king[1][1]; + + } + } else { + + // å®åå + // èªå½ã®ç·å¤§å°ã®ããããããNoåå¾ + if($king[0][0] == $countryID){ + + $kingmapchipno = $king[0][1]; + + } else { + + $kingmapchipno = $king[1][1]; + + } + + // èªå½ã®é²è¡ç¯å²ã®ææ·±é¨ã«ããæµãããããããåå¾ + if($kingmapchipno < (MAP_MAX / 2)){ + + $defencearea = DEFENCE_AREA; + $sql_search_enemy = 'select mapChipNo from t_battle where roomID=:roomID and countryID<>:countryID and mapChipNo < :mapChipNo order by mapChipNo'; + + } else { + + $defencearea = MAP_MAX - DEFENCE_AREA; + $sql_search_enemy = 'select mapChipNo from t_battle where roomID=:roomID and countryID<>:countryID and mapChipNo > :mapChipNo order by mapChipNo desc'; + + } + + $param_search_enemy = array(":userID" => "$userID", ":roomID" => "$roomID", ":countryID" => "$countryID", ":mapChipNo" => "$defencearea"); + $result_search_enemy = $session->query_select($sql_search_enemy, $param_search_enemy); + + if (!empty($result_search_enemy)){ + + $targetmapchipno = $result_search_enemy[0][0]; + + } else { + + $targetmapchipno = ''; + + } + + } + + // 移åå ããããããè¨å® + if (!empty($targetmapchipno)) { + // ããã縦ä½ç½®æ¯è¼ + $mapChipRow = floor($mapChipNo / 60); + $targetmapchiprow = floor($targetmapchipno / 60); + + if ($mapChipRow < $targetmapchiprow) { + + $moveMapChipNo = $mapChipRow + MAP_UP; + + } elseif ($mapChipRow > $targetmapchiprow){ + + $moveMapChipNo = $mapChipRow + MAP_DOWN; + + } else { + + // ããã横ä½ç½®æ¯è¼ + if($mapChipNo < $targetmapchipno) { + + $moveMapChipNo = $mapChipNo + MAP_RIGHT; + + } elseif ($mapChipNo > $targetmapchipno) { + + $moveMapChipNo = $mapChipNo + MAP_LEFT; + + } + } + } else { + + $moveMapChipNo = $mapChipNo; + + } + + $sql_insert_uaction = 'insert into t_userAction (userID, roomID, moveMapChipNo, lastUpdateDate) values (:userID, :roomID, :moveMapChipNo, now())'; + $param_insert_uaction = array(":userID" => "$userID", ":roomID" => "$roomid", ":moveMapChipNo" => "$moveMapChipNo"); + + $result_insert_uaction = $session->query_update($sql_insert_uaction, $param_insert_uaction); + + } + + } + + } Added: tags/Ver.0.1.5/Server/server_php/battleCalc.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/battleCalc.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/battleCalc.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,45 @@ +<?php + + function battlecalculate() { + + try { + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select userID, roomID, moveMapChipNo, battleCommandID, battleMapChipNo from t_userAction'; + $result = $session->query_select($sql, $pa); + + if (empty($result)) { + throw new Exception('0080002', SYSTEM_ERROR); + } else { + foreach($result as $row) { + if (! empty($row['battleMapChipNo'])) { + $sql = 'update t_battle set power = power - :dp where battleMapChipNo = :bMapchip and roomID = :rid'; + $pa = array( ":dp" => DEC_POWER, ":bMapchip" => $row['battleMapChipNo'], ":roomID" => $row['rid']); + $result_uid = $session->query_select($sql, $pa); + } + } + + foreach($result as $row) { + if (! empty($row['moveMapChipNo'])) { + $sql = 'update t_battle set mapChipNo = :mapChipNo where userID = :uid and roomID = :rid'; + $pa = array( ":mapChipNo" => $row['moveMapChipNo'], ":userID" => $row['userID'], ":roomID" => $row['rid']); + $result_uid = $session->query_select($sql, $pa); + } + } + } + + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + if ($e->getCode() == SYSTEM_ERROR) { + throw $e; + } else { + throw new Exception('00002', SYSTEM_ERROR); + } + } + } + Added: tags/Ver.0.1.5/Server/server_php/checkLib.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/checkLib.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/checkLib.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,55 @@ +<?php + + function userIDCheck($uid) { + + + if (strlen($uid) <> USERID_CNT) { + throw new Exception('00100', SYSTEM_ERROR); + } + + if (substr($uid, 0, 1) <> USERID_PREFIX) { + throw new Exception('00101', SYSTEM_ERROR); + } + + return $uid; + + } + + function roomIDCheck($rid) { + + if (! is_numeric($rid)) { + throw new Exception('00200', SYSTEM_ERROR); + } + + return $rid; + + } + + function sessionCheck($cmd, $uid, $sid) { + + require('sessionException.php'); + + switch($cmd) { + + case 'xxxxx': + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $uid = userIDCheck($uid); + + $sql = 'select userID from t_login where userID = :userID and sessionID = :sessionID'; + $param = array(":userID" => "$uid", + ":sessionID" => "$sid"); + + $result = $session->query_select($sql, $param); + + if (empty($result)) { + + throw new sessionException('ã»ãã·ã§ã³éã', SESSION_ERROR); + + } + } + + } + Added: tags/Ver.0.1.5/Server/server_php/dbparam.inc =================================================================== --- tags/Ver.0.1.5/Server/server_php/dbparam.inc (rev 0) +++ tags/Ver.0.1.5/Server/server_php/dbparam.inc 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,68 @@ +<?php +/** + * ãã¼ã¿ãã¼ã¹ã¢ã¯ã»ã¹ã«é¢ããããã±ã¼ã¸ã§ã + * + * ãã¼ã¿ãã¼ã¹ã¸æ¥ç¶ãããã©ã¡ã¼ã¿ã®è¨è¿°ã§ãã + * + * @category Database + * @package dbutil + * @author okotaneko + * @version 1.0 + * @access public + */ + +/** + * ãã㯠inlcude DocBlock ã§ãã + * + * inlcude ãã¡ã¤ã«ã®èª¬æãªã©æ¸ãã¾ãã + */ + +/** + * ãã¼ã¿ãã¼ã¹ã®ç¨®é¡ + * + * @var string æ¥ç¶ãã¼ã¿ãã¼ã¹ç¨®é¡ + */ +define('DB_CON_TYPE', 'mysql'); + +/** + * ããã©ã«ããã¼ã¿ãã¼ã¹ã®æ¥ç¶å + * + * @var string æ¥ç¶ãã¼ã¿ãã¼ã¹æ¥ç¶å + */ +define('DB_CON_HOST', '127.0.0.1'); + +/** + * ããã©ã«ããã¼ã¿ãã¼ã¹å称 + * + * @var string æ¥ç¶ãã¼ã¿ãã¼ã¹å + */ +define('DB_CON_NAME', 'dbname'); + +/** + * ããã©ã«ããã¼ã¿ãã¼ã¹ãã¼ãå + * + * @var string æ¥ç¶å ãã¼ãçªå· + */ +define('DB_CON_PORT', '0000'); + +/** + * ããã©ã«ããã¼ã¿ãã¼ã¹æ¥ç¶ã¦ã¼ã¶å + * + * @var string æ¥ç¶ãã¼ã¿ã¦ã¼ã¶å + */ +define('DB_CON_USER', 'user'); + +/** + * ããã©ã«ããã¼ã¿ãã¼ã¹æ¥ç¶ã¦ã¼ã¶ãã¹ã¯ã¼ã + * + * @var string æ¥ç¶ãã¼ã¿ãã¼ã¹æ¥ç¶ã¦ã¼ã¶ãã¹ã¯ã¼ã + */ +define('DB_CON_PASS', 'userpass'); + +/** + * æåã³ã¼ãã»ãã + * + * @var string æåã³ã¼ãã»ãã + */ +define('CHAR_SET', 'SET NAMES UTF-8'); + Added: tags/Ver.0.1.5/Server/server_php/dbutil.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/dbutil.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/dbutil.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,371 @@ +<?php +/** + * ãã¼ã¿ãã¼ã¹ã¢ã¯ã»ã¹ã«é¢ããããã±ã¼ã¸ã§ã + * + * ãã®ãã¼ãã±ã¼ã¸ã®ãã¼ã¿ãã¼ã¹ã¸ã¢ã¯ã»ã¹ã¯PDOã使ç¨ãã¾ãã + * ãã¼ã¿ãã¼ã¹ã®æ¥ç¶æåã¯ãã®ããã±ã¼ã¸å ã«è¨è¿°ãã¦ãã¾ãã + * ä¾å¤ãçºçããæã¯ãã®ã¯ã©ã¹ãå¼ã³åºãå ã§å¦çãã¦ãã ãã + * + * @category Database + * @package dbutil + * @author okotaneko + * @version 1.0 + * @access public + */ + +/** + * inlcude DocBlock ã§ãã + * + * inlcude ãã¡ã¤ã«ã®èª¬æãªã©æ¸ãã¾ãã + */ + +require('dbparam.inc'); + + +/** + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã¯ã©ã¹ + * + * ãã¼ã¿ãã¼ã¹ã¸ã®æ¥ç¶ã¨åæã管çãã¾ãã + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ããã¼ã¿ã¢ã¯ã»ã¹ã¯ã©ã¹ã«æ¸¡ãã¾ãã + * + * @category database + * @package dbutil + * @author okotaneko + * @version 0.1 + * @access public + */ +class DBConnection { + + /** + * ãã¼ã¿ãã¼ã¹ã¤ã³ã¹ã¿ã³ã¹ + * @var object æ¥ç¶æã®ã¤ã³ã¹ã¿ã³ã¹ãä¿æãã + * @access public + */ + private $db = null; + + /** + * ãã¼ã¿ãã¼ã¹æ¥ç¶ç¶æ ã®ä¿æ + * + * @var Bool ãã¼ã¿ãã¼ã¹ã®æ¥ç¶ç¶æ æ¥ç¶ä¸ = True æªæ¥ç¶ = False + * @access public + */ + private $ConnectFlg = False; + + /** + * ãã¼ã¿ãã¼ã¹æ¥ç¶æåå + * + * @var string ãã¼ã¿ãã¼ã¹ã®æ¥ç¶æåå + * @access public + */ + private $DBparam = null; + + /** + * ãã¼ã¿ãã¼ã¹ã¦ã¼ã¶ã¼å + * + * @var string ãã¼ã¿ãã¼ã¹ã®ã¦ã¼ã¶ã¼å + * @access public + */ + private $DBUser = null; + + /** + * ãã¼ã¿ãã¼ã¹ã¦ã¼ã¶ã¼ãã¹ã¯ã¼ã + * + * @var string ãã¼ã¿ãã¼ã¹ã®ã¦ã¼ã¶ã¼ãã¹ã¯ã¼ã + * @access public + */ + private $DBPassWD = null; + + + /** + * ã³ã³ã¹ãã©ã¯ã¿ + * + * ãã¼ã¿ãã¼ã¹ã®æ¥ç¶æåã®è¨å®ã¯ããã¼ã¿ãã¼ã¹ã®ç¨®é¡ï¼$DBTypeï¼ãè¨å®ããã¦ããªãå ´åããã©ã«ãå¤ã使ãã¾ãã + * + * @param string $DBType ãã¼ã¿ãã¼ã¹ã®ç¨®é¡ + * @param string $Host ãã¼ã¿ãã¼ã¹æ¥ç¶å ãã¹ãå + * @param string $Port ãã¼ã¿ãã¼ã¹æ¥ç¶å ãã¼ãå + * @param string $DBName ãã¼ã¿ãã¼ã¹å + * @param string $UserName ãã¼ã¿ãã¼ã¹ã¦ã¼ã¶å + * @param string $PassWD ãã¼ã¿ãã¼ã¹ãã¹ã¯ã¼ã + * @return void + * @access public + */ + public function __construct($DBType = null, $Host = null, $Port = null, $DBName = null, $UserName = null, $PassWD = null) { + + if (is_null($DBType)) { + $this->DBparam = DB_CON_TYPE . ':dbname=' . DB_CON_NAME . ';host=' . DB_CON_HOST . ' port=' . DB_CON_PORT; + $this->DBUser = DB_CON_USER; + $this->DBPassWD = DB_CON_PASS; + } else { + $this->Dbparam = $DBType . ':dbname=' . $DBName . ' host=' . $Host . ' port=' . $Port; + $this->DBUser = $UserName; + $this->DBPassWD = $PassWD; + } + + + $this->Connect(); + } + + /** + * ãã¹ãã©ã¯ã¿ + * + * @return void + * @access public + */ + public function __destruct() { + $db = null; + } + + /** + * ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ãã¾ããã + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ãä½æãã¾ãã + * + * @return void + * @access public + */ + public function Connect() { + + if (! $this->ConnectFlg) { + $this->DisConnect(); + } + + $this->db = new PDO($this->DBparam, $this->DBUser, $this->DBPassWD); + $this->db->query('CHAR_SET'); + $this->ConnectFlg = True; + } + + /** + * ãã¼ã¿ãã¼ã¹ã®æ¥ç¶ãåæãã¾ããã + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ã解æ¾ãã¾ãã + * + * @return void + * @access public + */ + public function DisConnect() { + + $this->db = null; + $this->ConnectFlg = False; + } + + /** + * ãã¼ã¿ãã¼ã¹æ¥ç¶ç¶æ ãè¿ã + * + * @return Bool $ConnectFlg æ¥ç¶ä¸=True æªæ¥ç¶=False + * @access public + */ + public function Connected() { + + return $this->ConnectFlg; + } + + /** + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã¤ã³ã¹ã¿ã³ã¹ãã»ãã·ã§ã³ã¯ã©ã¹ã«æ¸¡ã + * + * @param object $DBsession ã»ãã·ã§ã³ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ + * @return void + * @access public + */ + public function AssignDBConnection($DBsession){ + + $DBsession->SetDBConnection($this->db); + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãããããã£ã¸ã®æ¸è¾¼ã¿ã¯ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããããããã£å + * @param string $value ããããã£å¤ + * @return void + * @access public + */ + function __set($name, $value) { + + throw new Exception('åå¨ããªãããããã£ã¸ã®ã¢ã¯ã»ã¹'); + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãããããã£ã®èªè¾¼ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããããããã£å + * @return oject + * @access public + */ + function __get($name) { + + throw new Exception('åå¨ããªãããããã£ã¸ã®ã¢ã¯ã»ã¹'); + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãã¡ã½ããã®å®è¡ã¯ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããã¡ã½ããå + * @param array $arguments ã¡ã½ããã®å¼æ°(ããã·ã¥é å) + * @return void + * @access public + */ + function __call($name, $arguments) { + + throw new Exception('åå¨ããªãã¡ã½ããã¸ã®ã¢ã¯ã»ã¹'); + } +} + +/** + * ãã¼ã¿ãã¼ã¹ã¢ã¯ã»ã¹ã¯ã©ã¹ + * + * ãã¼ã¿ãã¼ã¹ã¸ã®ã»ãã·ã§ã³ãä¿æãã¾ããã + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ãã³ãã¯ã·ã§ã³ã¯ã©ã¹ããåå¾ããã¼ã¿ãã¼ã¹ã¸ã¢ã¯ã»ã¹ãã¾ãã + * ä¾å¤ãçºçããæã¯ãã®ã¯ã©ã¹ãå¼ã³åºãå ã§å¦çãã¦ãã ãã + * + * @category databese + * @package dbutil + * @author okotaneko + * @version 0.1 + * @access public + */ +class DBSession { + + /** + * ãã¼ã¿ãã¼ã¹ã¤ã³ã¹ã¿ã³ã¹ + * ãã¼ã¿ãã¼ã¹ã¤ã³ã¹ã¿ã³ã¹ãæ¥ç¶ã¯ã©ã¹ãããããã¾ãã(åç §) + * @var object ãã¼ã¿ãã¼ã¹æ¥ç¶ã¤ã³ã¹ã¿ã³ã¹ + * @access public + */ + private $Db = null; + + /** + * ã³ã³ã¹ãã©ã¯ã¿ + * + * @param object $DBConnection ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ ãªãå ´åã¯æ¸¡ããªãã¦ããã + * @return void + * @access public + */ + public function __construct($DBConnection = null) { + + if (! is_null($DBConnection)) { + $this->SetDBConnection($DBConnection); + } + } + + /** + * ãã¹ãã©ã¯ã¿ + * + * @return void + * @access public + */ + public function __destruct() { + + } + + /** + * ãã¼ã¿ãã¼ã¹ã³ãã¯ã·ã§ã³ã¯ã©ã¹ãã»ãããã + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ã®åç §ãã»ãããã¾ãã + * + * @param object $DBConnection ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ + * @return void + * @access public + */ + public function SetDBConnection($DBConnection) { + + $this->Db = $DBConnection; + } + + /** + * selectæãçºè¡ãã + * + * @param array $s PDOStatementãªãã¸ã§ã¯ã + * @param array $param ãã¤ã³ãå¤æ°ã®é ç®ã¨å¤ã®ããã·ã¥é å + * @return void + * @access private + */ + private function setBindParam(&$s, &$param) { + + if (! empty($param)) { + foreach ($param as $key => $value) { + $s->bindParam("$key", $value); + } + } + } + + /** + * selectæãçºè¡ãã + * + * @param string $sql å®è¡ããSQLæå¿ ããã¤ã³ãå¤æ°ã使ç¨ããã㨠+ * @param array $param ãã¤ã³ãå¤æ°ã®é ç®ã¨å¤ã®ããã·ã¥é å + * @return array string çµæã»ãã + * @return void + * @access public + */ + public function query_select(&$sql, &$param) { + + $s = $this->Db->prepare($sql); + $this->setBindParam($s, $param); + + if (! $s->execute($param)) { + throw new Exception('0030001', SYSTEM_ERROR); + } + + return $s->fetchAll(); + + } + + /** + * insert update deleteæãçºè¡ãã + * + * @param string $sql å®è¡ããSQLæå¿ ããã¤ã³ãå¤æ°ã使ç¨ããã㨠+ * @param array $param ãã¤ã³ãå¤æ°ã®é ç®ã¨å¤ã®ããã·ã¥é å + * @return integer æ´æ°ããè¡æ° + * @access public + */ + public function query_update(&$sql, &$param) { + + $s = $this->Db->prepare($sql); + $this->setBindParam($s, $param); + + if (! $s->execute($param)) { + throw new Exception('0030002', SYSTEM_ERROR); + } + + return $s->rowCount(); + + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãããããã£ã¸ã®æ¸è¾¼ã¿ã¯ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããããããã£å + * @param string $value ããããã£å¤ + * @return void + * @access public + */ + function __set($name, $value) { + + throw new Exception('åå¨ããªãããããã£ã¸ã®ã¢ã¯ã»ã¹'); + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãããããã£ã®èªè¾¼ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããããããã£å + * @return oject + * @access public + */ + function __get($name) { + + throw new Exception('åå¨ããªãããããã£ã¸ã®ã¢ã¯ã»ã¹'); + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãã¡ã½ããã®å®è¡ã¯ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããã¡ã½ããå + * @param array $arguments ã¡ã½ããã®å¼æ°(ããã·ã¥é å) + * @return void + * @access public + */ + function __call($name, $arguments) { + + throw new Exception('åå¨ããªãã¡ã½ããã¸ã®ã¢ã¯ã»ã¹'); + } + +} + Added: tags/Ver.0.1.5/Server/server_php/dbutil.php.bak2 =================================================================== --- tags/Ver.0.1.5/Server/server_php/dbutil.php.bak2 (rev 0) +++ tags/Ver.0.1.5/Server/server_php/dbutil.php.bak2 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,371 @@ +<?php +/** + * ãã¼ã¿ãã¼ã¹ã¢ã¯ã»ã¹ã«é¢ããããã±ã¼ã¸ã§ã + * + * ãã®ãã¼ãã±ã¼ã¸ã®ãã¼ã¿ãã¼ã¹ã¸ã¢ã¯ã»ã¹ã¯PDOã使ç¨ãã¾ãã + * ãã¼ã¿ãã¼ã¹ã®æ¥ç¶æåã¯ãã®ããã±ã¼ã¸å ã«è¨è¿°ãã¦ãã¾ãã + * ä¾å¤ãçºçããæã¯ãã®ã¯ã©ã¹ãå¼ã³åºãå ã§å¦çãã¦ãã ãã + * + * @category Database + * @package dbutil + * @author okotaneko + * @version 1.0 + * @access public + */ + +/** + * inlcude DocBlock ã§ãã + * + * inlcude ãã¡ã¤ã«ã®èª¬æãªã©æ¸ãã¾ãã + */ + +require('dbparam.inc'); + + +/** + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã¯ã©ã¹ + * + * ãã¼ã¿ãã¼ã¹ã¸ã®æ¥ç¶ã¨åæã管çãã¾ãã + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ããã¼ã¿ã¢ã¯ã»ã¹ã¯ã©ã¹ã«æ¸¡ãã¾ãã + * + * @category database + * @package dbutil + * @author okotaneko + * @version 0.1 + * @access public + */ +class DBConnection { + + /** + * ãã¼ã¿ãã¼ã¹ã¤ã³ã¹ã¿ã³ã¹ + * @var object æ¥ç¶æã®ã¤ã³ã¹ã¿ã³ã¹ãä¿æãã + * @access public + */ + private $db = null; + + /** + * ãã¼ã¿ãã¼ã¹æ¥ç¶ç¶æ ã®ä¿æ + * + * @var Bool ãã¼ã¿ãã¼ã¹ã®æ¥ç¶ç¶æ æ¥ç¶ä¸ = True æªæ¥ç¶ = False + * @access public + */ + private $ConnectFlg = False; + + /** + * ãã¼ã¿ãã¼ã¹æ¥ç¶æåå + * + * @var string ãã¼ã¿ãã¼ã¹ã®æ¥ç¶æåå + * @access public + */ + private $DBparam = null; + + /** + * ãã¼ã¿ãã¼ã¹ã¦ã¼ã¶ã¼å + * + * @var string ãã¼ã¿ãã¼ã¹ã®ã¦ã¼ã¶ã¼å + * @access public + */ + private $DBUser = null; + + /** + * ãã¼ã¿ãã¼ã¹ã¦ã¼ã¶ã¼ãã¹ã¯ã¼ã + * + * @var string ãã¼ã¿ãã¼ã¹ã®ã¦ã¼ã¶ã¼ãã¹ã¯ã¼ã + * @access public + */ + private $DBPassWD = null; + + + /** + * ã³ã³ã¹ãã©ã¯ã¿ + * + * ãã¼ã¿ãã¼ã¹ã®æ¥ç¶æåã®è¨å®ã¯ããã¼ã¿ãã¼ã¹ã®ç¨®é¡ï¼$DBTypeï¼ãè¨å®ããã¦ããªãå ´åããã©ã«ãå¤ã使ãã¾ãã + * + * @param string $DBType ãã¼ã¿ãã¼ã¹ã®ç¨®é¡ + * @param string $Host ãã¼ã¿ãã¼ã¹æ¥ç¶å ãã¹ãå + * @param string $Port ãã¼ã¿ãã¼ã¹æ¥ç¶å ãã¼ãå + * @param string $DBName ãã¼ã¿ãã¼ã¹å + * @param string $UserName ãã¼ã¿ãã¼ã¹ã¦ã¼ã¶å + * @param string $PassWD ãã¼ã¿ãã¼ã¹ãã¹ã¯ã¼ã + * @return void + * @access public + */ + public function __construct($DBType = null, $Host = null, $Port = null, $DBName = null, $UserName = null, $PassWD = null) { + + if (is_null($DBType)) { + $this->DBparam = DB_CON_TYPE . ':dbname=' . DB_CON_NAME . ';host=' . DB_CON_HOST . ' port=' . DB_CON_PORT; + $this->DBUser = DB_CON_USER; + $this->DBPassWD = DB_CON_PASS; + } else { + $this->Dbparam = $DBType . ':dbname=' . $DBName . ' host=' . $Host . ' port=' . $Port; + $this->DBUser = $UserName; + $this->DBPassWD = $PassWD; + } + + + $this->Connect(); + } + + /** + * ãã¹ãã©ã¯ã¿ + * + * @return void + * @access public + */ + public function __destruct() { + $db = null; + } + + /** + * ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ãã¾ããã + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ãä½æãã¾ãã + * + * @return void + * @access public + */ + public function Connect() { + + if (! $this->ConnectFlg) { + $this->DisConnect(); + } + + $this->db = new PDO($this->DBparam, $this->DBUser, $this->DBPassWD); + $this->db->query('CHAR_SET'); + $this->ConnectFlg = True; + } + + /** + * ãã¼ã¿ãã¼ã¹ã®æ¥ç¶ãåæãã¾ããã + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ã解æ¾ãã¾ãã + * + * @return void + * @access public + */ + public function DisConnect() { + + $this->db = null; + $this->ConnectFlg = False; + } + + /** + * ãã¼ã¿ãã¼ã¹æ¥ç¶ç¶æ ãè¿ã + * + * @return Bool $ConnectFlg æ¥ç¶ä¸=True æªæ¥ç¶=False + * @access public + */ + public function Connected() { + + return $this->ConnectFlg; + } + + /** + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã¤ã³ã¹ã¿ã³ã¹ãã»ãã·ã§ã³ã¯ã©ã¹ã«æ¸¡ã + * + * @param object $DBsession ã»ãã·ã§ã³ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ + * @return void + * @access public + */ + public function AssignDBConnection($DBsession){ + + $DBsession->SetDBConnection($this->db); + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãããããã£ã¸ã®æ¸è¾¼ã¿ã¯ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããããããã£å + * @param string $value ããããã£å¤ + * @return void + * @access public + */ + function __set($name, $value) { + + throw new Exception('åå¨ããªãããããã£ã¸ã®ã¢ã¯ã»ã¹'); + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãããããã£ã®èªè¾¼ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããããããã£å + * @return oject + * @access public + */ + function __get($name) { + + throw new Exception('åå¨ããªãããããã£ã¸ã®ã¢ã¯ã»ã¹'); + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãã¡ã½ããã®å®è¡ã¯ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããã¡ã½ããå + * @param array $arguments ã¡ã½ããã®å¼æ°(ããã·ã¥é å) + * @return void + * @access public + */ + function __call($name, $arguments) { + + throw new Exception('åå¨ããªãã¡ã½ããã¸ã®ã¢ã¯ã»ã¹'); + } +} + +/** + * ãã¼ã¿ãã¼ã¹ã¢ã¯ã»ã¹ã¯ã©ã¹ + * + * ãã¼ã¿ãã¼ã¹ã¸ã®ã»ãã·ã§ã³ãä¿æãã¾ããã + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ãã³ãã¯ã·ã§ã³ã¯ã©ã¹ããåå¾ããã¼ã¿ãã¼ã¹ã¸ã¢ã¯ã»ã¹ãã¾ãã + * ä¾å¤ãçºçããæã¯ãã®ã¯ã©ã¹ãå¼ã³åºãå ã§å¦çãã¦ãã ãã + * + * @category databese + * @package dbutil + * @author okotaneko + * @version 0.1 + * @access public + */ +class DBSession { + + /** + * ãã¼ã¿ãã¼ã¹ã¤ã³ã¹ã¿ã³ã¹ + * ãã¼ã¿ãã¼ã¹ã¤ã³ã¹ã¿ã³ã¹ãæ¥ç¶ã¯ã©ã¹ãããããã¾ãã(åç §) + * @var object ãã¼ã¿ãã¼ã¹æ¥ç¶ã¤ã³ã¹ã¿ã³ã¹ + * @access public + */ + private $Db = null; + + /** + * ã³ã³ã¹ãã©ã¯ã¿ + * + * @param object $DBConnection ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ ãªãå ´åã¯æ¸¡ããªãã¦ããã + * @return void + * @access public + */ + public function __construct($DBConnection = null) { + + if (! is_null($DBConnection)) { + $this->SetDBConnection($DBConnection); + } + } + + /** + * ãã¹ãã©ã¯ã¿ + * + * @return void + * @access public + */ + public function __destruct() { + + } + + /** + * ãã¼ã¿ãã¼ã¹ã³ãã¯ã·ã§ã³ã¯ã©ã¹ãã»ãããã + * ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ã®åç §ãã»ãããã¾ãã + * + * @param object $DBConnection ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ã¤ã³ã¹ã¿ã³ã¹ + * @return void + * @access public + */ + public function SetDBConnection($DBConnection) { + + $this->Db = $DBConnection; + } + + /** + * selectæãçºè¡ãã + * + * @param array $s PDOStatementãªãã¸ã§ã¯ã + * @param array $param ãã¤ã³ãå¤æ°ã®é ç®ã¨å¤ã®ããã·ã¥é å + * @return void + * @access private + */ + private function setBindParam(&$s, &$param) { + + if (! empty($param)) { + foreach ($param as $key => $value) { + $s->bindParam("$param[$key]", "$value"); + } + } + } + + /** + * selectæãçºè¡ãã + * + * @param string $sql å®è¡ããSQLæå¿ ããã¤ã³ãå¤æ°ã使ç¨ããã㨠+ * @param array $param ãã¤ã³ãå¤æ°ã®é ç®ã¨å¤ã®ããã·ã¥é å + * @return array string çµæã»ãã + * @return void + * @access public + */ + public function query_select(&$sql, &$param) { + + $s = $this->Db->prepare($sql); + $this->setBindParam($s, $param); + + if (! $s->execute($param)) { + throw new Exception('0030001', SYSTEM_ERROR); + } + + return $s->fetchAll(); + + } + + /** + * insert update deleteæãçºè¡ãã + * + * @param string $sql å®è¡ããSQLæå¿ ããã¤ã³ãå¤æ°ã使ç¨ããã㨠+ * @param array $param ãã¤ã³ãå¤æ°ã®é ç®ã¨å¤ã®ããã·ã¥é å + * @return integer æ´æ°ããè¡æ° + * @access public + */ + public function query_update(&$sql, &$param) { + + $s = $this->Db->prepare($sql); + $this->setBindParam($s, $param); + + if (! $s->execute($param)) { + throw new Exception('0030002', SYSTEM_ERROR); + } + + return $s->rowCount(); + + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãããããã£ã¸ã®æ¸è¾¼ã¿ã¯ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããããããã£å + * @param string $value ããããã£å¤ + * @return void + * @access public + */ + function __set($name, $value) { + + throw new Exception('åå¨ããªãããããã£ã¸ã®ã¢ã¯ã»ã¹'); + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãããããã£ã®èªè¾¼ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããããããã£å + * @return oject + * @access public + */ + function __get($name) { + + throw new Exception('åå¨ããªãããããã£ã¸ã®ã¢ã¯ã»ã¹'); + } + + /** + * ã¯ã©ã¹ã«åå¨ããªãã¡ã½ããã®å®è¡ã¯ã¯ã¨ã©ã¼ã¨ãã + * + * @param string $name ã¢ã¯ã»ã¹ããã¡ã½ããå + * @param array $arguments ã¡ã½ããã®å¼æ°(ããã·ã¥é å) + * @return void + * @access public + */ + function __call($name, $arguments) { + + throw new Exception('åå¨ããªãã¡ã½ããã¸ã®ã¢ã¯ã»ã¹'); + } + +} + Added: tags/Ver.0.1.5/Server/server_php/entryNewUser.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/entryNewUser.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/entryNewUser.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,199 @@ +<?php + + function commandExecute(&$sid) { + + try { + + /* + $username = $_GET['un']; + $latitude = $_GET['lat']; + $longitude = $_GET['lan']; + */ + + $username = $_POST['un']; + $latitude = $_POST['lat']; + $longitude = $_POST['lan']; + + if (strlen($username) == 0 || strlen($username) > USERNAME_CNT) { + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('01000', SYSTEM_ERROR); + } + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + // ã¦ã¼ã¶åã®éè¤ãã§ã㯠+ $sql_name_search = 'select userName from t_user where userName = :userName'; + $param_name_search = array(":userName" => "$username"); + + $result_name_search = $session->query_select($sql_name_search, $param_name_search); + + if (!empty($result_name_search)){ + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('02000', SYSTEM_ERROR); + } + + // åæãã©ã¡ã¼ã¿åå¾ + $sql_default_param = 'select paramID from t_defaultParam where paramType=1'; + $result_default_param = $session->query_select($sql_default_param, $pa); + + if (empty($result_default_param)) { + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('07000', SYSTEM_ERROR); + + } + + $default_param = $result_default_param[0][0]; + + // 人å£ãä¸çªå°ãªãå½ãåå¾ + $sql_country_count = 'select a.country, b.countryName, count(*) from t_user a, t_country b where a.country = b.countryID group by 1 order by 3'; + $result_country_count = $session->query_select($sql_country_count, $pa); + + if (empty($result_country_count)){ + + $defaultCountry = 1; + + } else { + + $defaultCountry = $row_country_count[0][0]; + $defaultCountryName = $row_country_count[0][1]; + + } + + // å½ãã¼ã¿åå¾ + $sql_country = 'select countryID, countryName from t_country order by countryID'; + $result_country = $session->query_select($sql_country, $pa); + + // GPS以å¤ã®å ´å + if ($latitude == 0 || $longitude == 0) { + + $num = rand(1, 9); + + if ($num <= 3) { + + $countryid = $result_country[0][0]; + $countryname = $result_country[0][1]; + + } elseif ($num <= 6) { + + $countryid = $result_country[1][0]; + $countryname = $result_country[1][1]; + + } else { + + $countryid = $result_country[2][0]; + $countryname = $result_country[2][1]; + + } + + } else { + + // GPSã®å ´å + $lati_mod = $latitude % 2; + $longi_mod = $longitude % 2; + + if ($lati_mod == 1 && $longi_mod == 1) { + + $countryid = $result_country[0][0]; + $countryname = $result_country[0][1]; + + } elseif ($lati_mod == 0 && $longi_mod == 1) { + + $countryid = $result_country[1][0]; + $countryname = $result_country[1][1]; + + } elseif ($lati_mod == 0 && $longi_mod == 0) { + + $countryid = $result_country[2][0]; + $countryname = $result_country[2][1]; + + } else { + + $countryid = $defaultCountry; + $countryname = $defaultCountryName; + } + + } + + // ã¦ã¼ã¶ç»é² + $sql_id_search = 'select userID from t_user where userID = :userID'; + $sql_insert_user = 'insert into t_user (userID, userName, paramID, country, lastUpdateDate) values (:userID, :userName, :paramID, :country, now())'; + + $entry_flg = false; + + for($i=0; $i<3; $i++) { + $userid = USERID_PREFIX . substr(md5(uniqid()),-9); + + $param_id_search = array(":userID" => "$userid"); + + $result_id_search = $session->query_select($sql_id_search, $param_id_search); + + if(empty($result_id_search)) { + + $param_insert_user = array(":userID" => "$userid", + ":userName" => "$username", + ":paramID" => "$default_param", + ":country" => "$countryid"); + + $result_insert_uesr = $session->query_update($sql_insert_user, $param_insert_user); + + if ($result_insert_uesr != 1) { + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('03000', SYSTEM_ERROR); + } + + $entry_flg = true; + + break; + + } + } + + if ($entry_flg ==false) { + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('04000', SYSTEM_ERROR); + } + + $sql_insert_user = 'insert into t_userStatus values (:userID, :win, :lost, now())'; + + $param_insert_user = array(":userID" => "$userid", ":win" => "0", ":lost" => "0"); + $result_insert_uesr = $session->query_update($sql_insert_user, $param_insert_user); + + if ($result_insert_uesr != 1) { + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('03000', SYSTEM_ERROR); + } + + // ãã°ã¤ã³æ å ±ç»é² + // ã»ãã·ã§ã³IDï¼ã¯ä»® + $sessionid = md5(uniqid(rand(),1)); + + $sql_insert_login = 'insert into t_login (userID, sessionID, lastLoginDate, lastUpdateDate) values (:userID, :sessionID, now(), now())'; + $param_insert_login = array(":userID" => "$userid", + ":sessionID" => "$sessionid"); + + $result_insert_login = $session->query_update($sql_insert_login, $param_insert_login); + + if ($result_insert_login != 1) { + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('05000', SYSTEM_ERROR); + } + + $sid = $sessionid; + $data = $userid . SP. $countryid . SP . $countryname; + + return $data; + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + if ($e->getCode() == SYSTEM_ERROR) { + throw $e; + } else { + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('06000', SYSTEM_ERROR); + } + } + } + Added: tags/Ver.0.1.5/Server/server_php/getAICharParam.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/getAICharParam.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/getAICharParam.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,27 @@ +<?php + + function commandExecute() { + + try { + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select a.charName, c.countryName, d.power, d.mobility from t_country c, t_defaultParam d, t_AICharacter a where a.countryID = c.countryID and a.paramID = d.paramID'; + $result = $session->query_select($sql, $pa); + + foreach($result as $row) { + $data = $data . $row[0] . SP . $row[1] . SP . $row[2] . SP . $row[3] . RLF; + } + $data = rtrim($data, RLF); + + return $data; + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + throw new Exception('00002', SYSTEM_ERROR); + } + } + Added: tags/Ver.0.1.5/Server/server_php/getBattleResult.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/getBattleResult.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/getBattleResult.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,38 @@ +<?php + + function commandExecute() { + + try { + + $rid = roomIDCheck($_POST['roomid']); + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select timerStatus from t_turnTimer where timerStatus != 2'; + $result = $session->query_select($sql, $pa); + + if(empty($result)) { + $data = '@'; + } else { + $sql = 'select charKbn, userName, countryID, mapChipNo, power from t_battle where roomID = :roomID'; + $pa = array(":roomID" => "$rid"); + + $result = $session->query_select($sql, $pa); + + foreach($result as $row) { + $data = $data . $row[0] . SP . $row[1] . SP . $row[2] . SP . $row[3] . SP . $row[4] . RLF; + } + $data = rtrim($data, RLF); + } + + return $data; + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + throw new Exception('00002', SYSTEM_ERROR); + } + } + Added: tags/Ver.0.1.5/Server/server_php/getIniUserParam.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/getIniUserParam.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/getIniUserParam.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,27 @@ +<?php + + function commandExecute() { + + try { + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select power, mobility from t_defaultParam where paramType = 1'; + $result = $session->query_select($sql, $pa); + + foreach($result as $row) { + $data = $data . $row[0] . SP . $row[1] . RLF; + } + $data = rtrim($data, RLF); + + return $data; + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + throw new Exception('00002', SYSTEM_ERROR); + } + } + Added: tags/Ver.0.1.5/Server/server_php/getMapInfo.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/getMapInfo.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/getMapInfo.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,27 @@ +<?php + + function commandExecute() { + + try { + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select mapID, mapName, mapExplanation, mapComponent from t_map'; + $result = $session->query_select($sql, $pa); + + foreach($result as $row) { + $data = $data . $row[0] . SP . $row[1] . SP . $row[2] . SP . $row[3] . RLF; + } + $data = rtrim($data, RLF); + + return $data; + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + throw new Exception('00002', SYSTEM_ERROR); + } + } + Added: tags/Ver.0.1.5/Server/server_php/getRoomInfo.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/getRoomInfo.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/getRoomInfo.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,27 @@ +<?php + + function commandExecute() { + + try { + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select roomID, roomName, roomStatus, offenseCountry, defenseCountry, mapID, maxTurnCount, turnCount from t_room where roomStatus in (0, 2)'; + $result = $session->query_select($sql, $pa); + + foreach($result as $row) { + $data = $data . $row[0] . SP . $row[1] . SP . $row[2] . SP . $row[3] . SP . $row[4] . SP . $row[5] . SP . $row[6] . SP . $row[7] . RLF ; + } + $data = rtrim($data, RLF); + + return $data; + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + throw new Exception('00002', SYSTEM_ERROR); + } + } + Added: tags/Ver.0.1.5/Server/server_php/getRoomStatus.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/getRoomStatus.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/getRoomStatus.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,27 @@ +<?php + + function commandExecute() { + + try { + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select roomID, battleRoomID, turnCount from t_roomStatus; + $result = $session->query_select($sql, $pa); + + foreach($result as $row) { + $data = $data . $row[0] . SP . $row[1] . SP . $row[2] . RLF; + } + $data = rtrim($data, RLF); + + return $data; + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + throw new Exception('00002', SYSTEM_ERROR); + } + } + Added: tags/Ver.0.1.5/Server/server_php/getRoomTurnCount.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/getRoomTurnCount.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/getRoomTurnCount.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,34 @@ +<?php + + function commandExecute() { + + try { + + $rid = roomIDCheck($_POST['roomid']); + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select maxTurnCount, turnCount from t_room where roomID=:roomID'; + $pa = array(":roomID" => "$rid"); + $result = $session->query_select($sql, $pa); + + if (empty($result)){ + throw new Exception('00200', SYSTEM_ERROR); + } + + foreach($result as $row) { + $data = $data . $row[0] . SP . $row[1] . RLF; + } + $data = rtrim($data, RLF); + + return $data; + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + throw new Exception('00002', SYSTEM_ERROR); + } + } + Added: tags/Ver.0.1.5/Server/server_php/getUserStatus.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/getUserStatus.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/getUserStatus.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,39 @@ +<?php + + function commandExecute() { + + try { + + $userid = userIDCheck($_POST['userid']); + // $userid = userIDCheck($_GET['userid']); + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select win, lost from t_userStatus where userID = :userID'; + $pa = array(":userID" => "$userid"); + $result = $session->query_select($sql, $pa); + + if (empty($result)) { + throw new Exception('00200', SYSTEM_ERROR); + } + + foreach($result as $row) { + $data = $data . $row[0] . SP . $row[1] . RLF; + } + $data = rtrim($data, RLF); + + return $data; + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + if ($e->getCode() == SYSTEM_ERROR) { + throw $e; + } else { + throw new Exception('00002', SYSTEM_ERROR); + } + } + } + Added: tags/Ver.0.1.5/Server/server_php/getcountry.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/getcountry.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/getcountry.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,27 @@ +<?php + + function commandExecute() { + + try { + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select countryID, countryName from t_country'; + $result = $session->query_select($sql, $pa); + + foreach($result as $row) { + $data = $data . $row[0] . SP . $row[1] . RLF; + } + $data = rtrim($data, RLF); + + return $data; + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + throw new Exception('00002', SYSTEM_ERROR); + } + } + Added: tags/Ver.0.1.5/Server/server_php/index.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/index.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/index.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,2 @@ +<?php + require('main.php'); \ No newline at end of file Added: tags/Ver.0.1.5/Server/server_php/login.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/login.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/login.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,51 @@ +<?php + + function commandExecute(&$sid) { + + try { + + $userid = userIDCheck($_POST['userid']); + // $userid = userIDCheck($_GET['userid']); + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql_id_search = 'select userID from t_user where userID = :userID'; + $param_id_search = array(":userID" => "$userid"); + $result_id_search = $session->query_select($sql_id_search, $param_id_search); + + if (empty($result_id_search)) { + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('08000', SYSTEM_ERROR); + } + + // ã»ãã·ã§ã³IDï¼ã¯ä»® + $sessionid = md5(uniqid(rand(),1)); + + $sql_update_login = 'update t_login set sessionID = :sessionID, lastLoginDate = now(), lastUpdateDate = now() where userID = :userID'; + $param_update_login = array(":sessionID" => "$sessionid", + ":userID" => "$userid"); + $result_update_login = $session->query_update($sql_update_login, $param_update_login); + + if ($result_update_login <> 1) { + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('09000', SYSTEM_ERROR); + } + + $sid = $sessionid; + $data = $userid; + + return $data; + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + if ($e->getCode() == SYSTEM_ERROR) { + throw $e; + } else { + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('09100', SYSTEM_ERROR); + } + } + } \ No newline at end of file Added: tags/Ver.0.1.5/Server/server_php/main.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/main.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/main.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,146 @@ +<?php + + require('checkLib.php'); + require('sysparam.inc'); + require('dbutil.php'); + + try { + + $comNo = substr($_POST['data'], 0, 6); +// $comNo = substr($_GET['data'], 0, 6); + + $userID = $_POST['userid']; + $sessionID = $_POST['sessionid']; + + switch ($comNo) { + + // æ°è¦ã¦ã¼ã¶ç»é² + case 'U01001': + require('entryNewUser.php'); + $result = commandExecute($sessionID); + break; + + // æ¢åã¦ã¼ã¶ãã°ã¤ã³ + case 'U01002': + require('login.php'); + $result = commandExecute($sessionID); + break; + + // æå±å½è¨å®è¦æ± + case 'C01001': + require(''); + break; + + // æå±å½ã®ä¸è¦§è¦æ± + case 'C01002': + sessionCheck($comNo, $userID, $sessionID); + + require('getcountry.php'); + $result = commandExecute(); + break; + + // ã¦ã¼ã¶ã®åæãã©ã¡ã¼ã¿è¦æ± + case 'U01003': + sessionCheck($comNo,$userID, $sessionID); + + require('getIniUserParam.php'); + $result = commandExecute(); + break; + + // ã¦ã¼ã¶ã®åæMAPä½ç½®è¨å®è¦æ± + case 'U01004': + require(''); + break; + + // ã¦ã¼ã¶ã¹ãã¼ã¿ã¹è¦æ± + case 'U01005': + sessionCheck($comNo, $userID, $sessionID); + + require('getUserStatus.php'); + $result = commandExecute(); + break; + + // AIæ¦å°ãã©ã¡ã¼ã¿è¦æ± + case 'A01001': + sessionCheck($comNo, $userID, $sessionID); + + require('getAICharParam.php'); + $result = commandExecute(); + break; + + // ã«ã¼ã æ å ±è¦æ± + case 'R01001': + sessionCheck($comNo, $userID, $sessionID); + + require('getRoomInfo.php'); + $result = commandExecute(); + break; + + // ã«ã¼ã å ¥å®¤è¦æ± + case 'R01003': + sessionCheck($comNo, $userID, $sessionID); + + require('setUserEntryRoom.php'); + commandExecute(); + break; + + // ã«ã¼ã é室è¦æ± + case 'R01004': +// sessionCheck($comNo, $userID, $sessionID); + +// require('setUserExitRoom.php'); +// commandExecute(); + break; + + // ã«ã¼ã ã¿ã¼ã³ã«ã¦ã³ãè¦æ± + case 'R01005': + sessionCheck($comNo, $userID, $sessionID); + + require('getRoomTurnCount.php'); + $result = commandExecute(); + break; + + // ãããæ å ±è¦æ± + case 'M01001': + sessionCheck($comNo, $userID, $sessionID); + + require('getMapInfo.php'); + $result = commandExecute(); + break; + + // æ¦éæ å ±éä¿¡ + case 'B01001': + sessionCheck($comNo, $userID, $sessionID); + + require('setBattleInfo.php'); + commandExecute(); + break; + + // æ¦éçµæè¦æ± + case 'B01002': + sessionCheck($comNo, $userID, $sessionID); + + require('getBattleResult.php'); + $result = commandExecute(); + break; + + // ã³ãã³ãã¨ã©ã¼(対å¿ã³ãã³ãããªã) + default: + throw new Exception('0000001', SYSTEM_ERROR); + + } + + echo $comNo . SP . CMD_OK . SP . $sessionID .($result ? RLF . $result : ""); + + } catch (sessionException $e) { + echo $comNo . SP . CMD_ERR . RLF . SESSION_ERROR; + } catch (Exception $e) { + if ($e->getCode() == SYSTEM_ERROR) { + echo $comNo . SP . CMD_ERR . RLF . $e->getMessage(); + } else { + // ä¸æãªã¨ã©ã¼æ±ã + echo $comNo . SP . CMD_ERR . RLF . UNKNOWN_ERROR; + } + } + +?> Added: tags/Ver.0.1.5/Server/server_php/sessionException.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/sessionException.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/sessionException.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,12 @@ +<?php + +class sessionException extends Exception { + + public function __construct($message =NULL, $code = 0) { + + parent::__construct($message, $code); + + } + +} + Added: tags/Ver.0.1.5/Server/server_php/setBattleInfo.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/setBattleInfo.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/setBattleInfo.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,60 @@ +<?php + + function commandExecute() { + + try { + + $userid = userIDCheck($_POST['userid']); + $roomid = roomIDCheck($_POST['roomid']); + $movemapchipno = $_POST['movemapchipno']; + $battlecommandid = $_POST['battlecommandid']; + $battlemapchipno = $_POST['battlemapchipno']; + + +// $userid = userIDCheck($_GET['userid']); +// $roomid = roomIDCheck($_GET['roomid']); +// $movemapchipno = $_GET['movemapchipno']; +// $battlecommandid = $_GET['battlecommandid']; +// $battlemapchipno = $_GET['battlemapchipno']; + + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql_user_search = 'select userID, roomID from t_userAction where userID = :userID and roomID = :roomID'; + $param_user_search = array(":userID" => "$userid", + ":roomID" => "$roomid"); + + $result_user_search = $session->query_select($sql_user_search, $param_user_search); + + if (!empty($result_user_search)){ + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('02000', SYSTEM_ERROR); + } + + $sql_action_insert = 'insert into t_userAction (userID, roomID, moveMapChipNo, battleCommandID, battleMapChipNo, lastUpdateDate) values (:userid, :roomid, :movemapchipno, :battlecommandid, :battlemapchipno, now())'; + $param_action_insert = array(":userid" => $userid, + ":roomid" => $roomid, + ":movemapchipno" => $movemapchipno, + ":battlecommandid" => $battlecommandid, + ":battlemapchipno" => $battlemapchipno); + + $result_action_insert = $session->query_update($sql_action_insert, $param_action_insert); + + if ($result_action_insert != 1) { + // ã¡ãã»ã¼ã¸ã¯ä»® + throw new Exception('03000', SYSTEM_ERROR); + } + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + if ($e->getCode() == SYSTEM_ERROR) { + throw $e; + } else { + throw new Exception('00002', SYSTEM_ERROR); + } + } + } + Added: tags/Ver.0.1.5/Server/server_php/setUserEntryRoom.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/setUserEntryRoom.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/setUserEntryRoom.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,135 @@ +<?php + + function commandExecute() { + + try { + + $uid = userIDCheck($_POST['userid']); + $rid = roomIDCheck($_POST['roomid']); + +// $uid = userIDCheck($_GET['userid']); +// $rid = roomIDCheck($_GET['roomid']); + + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select exclusionKbn from t_battle where userID = :userID and roomID = :roomID'; + $pa = array(":userID" => "$uid", ":roomID" => "$rid"); + $result = $session->query_select($sql, $pa); + + if (! empty($result)) { + + $sql = 'delete from t_battle where userID = :userID and roomID = :roomID'; + $pa = array(":userID" => "$uid", ":roomID" => "$rid"); + $result = $session->query_select($sql, $pa); + + +// throw new Exception('0080001', SYSTEM_ERROR); + } + + //ã¦ã¼ã¶æ å ±ãåã£ã¦ãã + + $sql = 'select u.userName, u.country, d.power, d.mobility from t_defaultParam d, t_user u where u.userID = :userID and u.paramID = d.paramID'; + $pa = array(":userID" => "$uid"); + $result = $session->query_select($sql, $pa); + + if (empty($result)) { + throw new Exception('0080002', SYSTEM_ERROR); + } else { + foreach($result as $row) { + $userName = $row['userName']; + $countryID = $row['country']; + $power = $row['power']; + $mobility = $row['mobility']; + } + } + + $umapNo = getUserMapNo(getUserType($session, $rid, $countryID)); + + // ä¹±æ°ãªã®ã§åãå¤ã«ãªããªããã¨ãåæâå¾ã§ç´ã + $bid = makeBattleID(); + + $sql = "insert into t_battle values (:bid, :rid, :uid, :userName, :countryID, :userKbn, :umapNo, :power, :mobility, :exclusionKbn, now())"; + $pa = array( + ":bid" => "$bid", + ":rid" => "$rid", + ":uid" => "$uid", + ":userName" => "$userName", + ":countryID" => "$countryID", + ":userKbn" => USER_KBN, + ":umapNo" => "$umapNo", + ":power" => "$power", + ":mobility" => "$mobility", + ":exclusionKbn" => "0"); + + $result = $session->query_update($sql, $pa); + + if ($result == 0) { + throw new Exception('0080003', SYSTEM_ERROR); + } + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + if ($e->getCode() == SYSTEM_ERROR) { + throw $e; + } else { + throw new Exception('00002', SYSTEM_ERROR); + } + } + } + + + function makeBattleID() { + + $bid = 0; + + for ($i = 0 ; $i < 8 ; $i++){ + $bid = $bid . mt_rand(0, 9); + } + + return $bid; + + } + + + function getUserType($s, $roomID, $countryID) { + + $sql = 'select offenseCountry, defenseCountry from t_room where roomID = :roomID'; + $pa = array(":roomID" => "$roomID"); + $result = $s->query_select($sql, $pa); + + if (empty($result)) { + throw new Exception('0080004', SYSTEM_ERROR); + } else { + foreach($result as $row) { + $offense = $row['offenseCountry']; + $defense = $row['defenseCountry']; + } + } + + switch ($countryID) { + case $offense: + $utype = OFF_TYPE; + break; + case $defense: + $utype = DEF_TYPE; + break; + default : + throw new Exception('0080005', SYSTEM_ERROR); + } + + return $utype; + + } + + + function getUserMapNo($utype) { + + $initMap = ($utype == OFF_TYPE) ? unserialize(OFF_INIT) : unserialize(DEF_INIT); + return $initMap[mt_rand(0, count($initMap))]; + + } + Added: tags/Ver.0.1.5/Server/server_php/setUserExitRoom.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/setUserExitRoom.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/setUserExitRoom.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,36 @@ +<?php + + function commandExecute() { + + try { + + $uid = userIDCheck($_POST['userid']); + $rid = roomIDCheck($_POST['roomid']); + +// $uid = userIDCheck($_GET['userid']); +// $rid = roomIDCheck($_GET['roomid']); + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'update t_battle set exclusionKbn = 1 where userID = :userID and roomID = :roomID'; + $pa = array(":userID" => "$uid", ":roomID" => "$rid"); + + $result = $session->query_update($sql, $pa); + + if ($result == 0) { + throw new Exception('0080001', SYSTEM_ERROR); + } + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + if ($e->getCode() == SYSTEM_ERROR) { + throw $e; + } else { + throw new Exception('00002', SYSTEM_ERROR); + } + } + } + Added: tags/Ver.0.1.5/Server/server_php/sysparam.inc =================================================================== --- tags/Ver.0.1.5/Server/server_php/sysparam.inc (rev 0) +++ tags/Ver.0.1.5/Server/server_php/sysparam.inc 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,150 @@ +<?php +/** + * ãã¼ã¿ãã¼ã¹ã¢ã¯ã»ã¹ã«é¢ããããã±ã¼ã¸ã§ã + * + * ãã¼ã¿ãã¼ã¹ã¸æ¥ç¶ãããã©ã¡ã¼ã¿ã®è¨è¿°ã§ãã + * + * @category system + * @package sysutil + * @author okotaneko + * @version 1.0 + * @access public + */ + +/** + * ãã㯠inlcude DocBlock ã§ãã + * + * inlcude ãã¡ã¤ã«ã®èª¬æãªã©æ¸ãã¾ãã + */ + +/** + * ä¸å½å¿ã·ã¹ãã ã¨ã©ã¼(ã¯ã©ã¤ã¢ã³ãã«ã¨ã©ã¼ãè¿ã) + * (æ¬å½ã¯Exceptionç¶æ¿ãã¦ç¬èªã¨ã©ã¼ãä½æããã®ã ã・・・) + * ä¾å¤ã®catchã®getCode以å¤ã§ä»æ§ããªãã㨠+ * + * @var string ä¸å½å¿ã·ã¹ãã ãç¬èªã«ä½¿ç¨ããã¨ã©ã¼ã³ã¼ã + */ +define('SYSTEM_ERROR', 99); + +/** + * ä¸æãªã¨ã©ã¼ã³ã¼ã + * + * @var string ã·ã¹ãã ãçæããä¾å¤ä»¥å¤ã®ã¨ã©ã¼ã³ã¼ã + */ +define('UNKNOWN_ERROR', 99999); + +/** + * ä¸æãªã¨ã©ã¼ã³ã¼ã + * + * @var string ã»ãã·ã§ã³IDä¸ä¸è´ã®ã¨ã©ã¼ã³ã¼ã + */ +define('SESSION_ERROR', 999); + +/** + * ã³ãã³ãæåå¤ + * + * @var integer ã³ãã³ã失ææã®å¤ + */ +define('CMD_ERR', 1); + +/** + * ã³ãã³ãæåå¤ + * + * @var integer ã³ãã³ãæåæã®å¤ + */ +define('CMD_OK', 0); + + +/** + * é»æã®ã»ãã¬ã¼ã¿æå + * + * @var string ã»ãã¬ã¼ã¿ã®æå + */ +define('SP', ','); + +/** + * é»æã®ã©ã¤ã³ãã£ã¼ã + * + * @var string ã»ãã¬ã¼ã¿ã®æå + */ +define('RLF', '>>'); + +/** + * UserIDã®æ¡æ° + * + * @var integer UserIDã®æ¡æ° + */ +define('USERID_CNT', 10); + +/** + * UserIDã®å(å é æå) + * + * @var integer UserIDã®å(å é æå) + */ +define('USERID_PREFIX', 'U'); + +/** + * UserNameã®æ¡æ° + * + * @var integer UserNameã®æ¡æ° + * + */ +define('USERNAME_CNT', 40); + +/** + * UserTypeã®åºå + * + * @var string UserIDã®åºåæå + */ +define('USER_KBN', 'u'); + +/** + * UserTypeã®åºå + * + * @var string ç·å¤§å°ã®åºåæå + */ +define('SOUDAISYO_KBN', 's'); + +/** + * åä»æéçµäºãã©ã° + * + * @var integer åä»æéãçµäºããæã®ãã©ã°å¤ + */ +define('OVERTIME', 1); + +/** + * æ»æå´å¤å®ãã©ã° + * + * @var integer æ»æå´å¤å®ãã©ã° + */ +define('OFF_TYPE', 1); + +/** + * å®åå´å¤å®ãã©ã° + * + * @var integer å®åå´å¤å®ãã©ã° + */ +define('DEF_TYPE', 2); + +/** + * æ»æå´åæä½ç½®é å + * + * @var integer æ»æå´åæé åä½ç½® + */ +define('OFF_INIT', serialize(array(2516,2517,2518,2519,2520,2561,2562,2563,2564,2565,2606,2607,2608,2609,2610,2651,2652,2653,2654,2655,2696,2697,2698,2699,2700))); + +/** + * å®åå´åæä½ç½®é å + * + * @var integer å®åå´åæé åä½ç½® + */ +define('DEF_INIT', serialize(array(1,2,3,4,5,46,47,48,49,50,91,92,93,94,95,136,137,138,139,140,181,182,183,184,185,41,42,43,44,45,86,87,88,89,90,131,132,133,134,135,176,177,178,179,180,221,222,223,224,225,2476,2477,2478,2479,2480,2521,2522,2523,2524,2525,2566,2567,2568,2569,2570,2611,2612,2613,2614,2615,2656,2657,2658,2659,2660))); + +/** + * æ»ææ¸ç®å° + * + * @var integer å®åå´å¤å®ãã©ã° + */ +define('DEC_POWER', 10); + + Added: tags/Ver.0.1.5/Server/server_php/table_t_login.txt =================================================================== --- tags/Ver.0.1.5/Server/server_php/table_t_login.txt (rev 0) +++ tags/Ver.0.1.5/Server/server_php/table_t_login.txt 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,8 @@ +CREATE TABLE IF NOT EXISTS `o_sangokushi`.`t_login` ( + `userID` VARCHAR(10) NOT NULL , + `sessionID` VARCHAR(40) NOT NULL , + `lastLoginDate` DATETIME NULL, + `lastUpdateDate` DATETIME NULL , + PRIMARY KEY (`userID`) ) +ENGINE = InnoDB +DEFAULT CHARACTER SET = utf8 \ No newline at end of file Added: tags/Ver.0.1.5/Server/server_php/turntimer.php =================================================================== --- tags/Ver.0.1.5/Server/server_php/turntimer.php (rev 0) +++ tags/Ver.0.1.5/Server/server_php/turntimer.php 2010-11-10 15:40:20 UTC (rev 468) @@ -0,0 +1,333 @@ +<?php + + require('dbutil.php'); + require('sysparam.inc'); + + try { + + $db = new DBConnection(); + $session = new DBSession($db); + $db->AssignDBConnection($session); + + $sql = 'select roomID, receiptTime, turnInterval, gameInterval, timerStatus, if(sum(unix_timestamp(now())-unix_timestamp(receiptTime)) > turnInterval, 1, 0) as timeover, if(sum(unix_timestamp(now())-unix_timestamp(receiptTime)) > gameInterval, 1, 0) as gamestart from t_turnTimer where roomID = 1'; + $sql .= ' union select roomID, receiptTime, turnInterval, gameInterval, timerStatus, if(sum(unix_timestamp(now())-unix_timestamp(receiptTime)) > turnInterval, 1, 0) as timeover, if(sum(unix_timestamp(now())-unix_timestamp(receiptTime)) > gameInterval, 1, 0) as gamestart from t_turnTimer where roomID = 2'; + $sql .= ' union select roomID, receiptTime, turnInterval, gameInterval, timerStatus, if(sum(unix_timestamp(now())-unix_timestamp(receiptTime)) > turnInterval, 1, 0) as timeover, if(sum(unix_timestamp(now())-unix_timestamp(receiptTime)) > gameInterval, 1, 0) as gamestart from t_turnTimer where roomID = 3'; + $sql .= ' union select roomID, receiptTime, turnInterval, gameInterval, timerStatus, if(sum(unix_timestamp(now())-unix_timestamp(receiptTime)) > turnInterval, 1, 0) as timeover, if(sum(unix_timestamp(now())-unix_timestamp(receiptTime)) > gameInterval, 1, 0) as gamestart from t_turnTimer where roomID = 4'; + $sql .= ' union select roomID, receiptTime, turnInterval, gameInterval, timerStatus, if(sum(unix_timestamp(now())-unix_timestamp(receiptTime)) > turnInterval, 1, 0) as timeover, if(sum(unix_timestamp(now())-unix_timestamp(receiptTime)) > gameInterval, 1, 0) as gamestart from t_turnTimer where roomID = 5'; + + $result = $session->query_select($sql, $pa); + + if (empty($result)) { + throw new Exception('00502', SYSTEM_ERROR); + } else { + foreach($result as $row) { + $rid = $row['roomID']; + $rtime = $row['receiptTime']; + $tinterval = $row['turnInterval']; + $ginterval = $row['gameInterval']; + $tstatus = $row['timerStatus']; + $tover = $row['timeover']; + $gstart = $row['gamestart']; + + switch($tstatus){ + case 0 : +// if ($gstart == OVERTIME) { + if (checkUser($session, $rid)){ + +// setNewGameReset($session, $rid); +// setNewTurnReset($session, $rid); +// setNewReceipt($session, 0, $rid); +// clsRoomTurnCount($session,$rid); +// roomRrecruit($session, $rid, 2); + // 次ã®AIã決ãã +// setAIchar($session, $rid); + } else { + setNewReceipt($session, 3, $rid); + } +// } + break; + case 1 : + // åä» + if ($tover == OVERTIME) { + + // åä»ãçµäºãã©ã°ããã¦ã + changeStatus($session, 2, $rid); + + // æ´æ°ä¸ã®ãã¼ã¿ããããããããªãã®ã§å¿µã®ããå°ãå¾ æ© + sleep(5); + + // è¨ç®ãã¸ãã¯ãå®è¡ãã + if (battlecalculate($session, $rid)) { + // 次ã®ã²ã¼ã éå§ç¶æ ã«ãã + setNewTurnReset($session, $rid); + setNewReceipt($session, 4, $rid); + + // ä¸æ¦åéã¯ãããªã + roomRrecruit($session, $rid, 1); + } else { + setNewTurnReset($session,$rid); + +// require('AI.php'); +// aiAction($rid); + + addRoomTurnCount($session,$rid); + // æ°ããæéãã»ãããã åä»ä¸ã«ãã + setNewReceipt($session, 1, $rid); + } + } + break; + case 3 : + if ($gstart == OVERTIME) { + setNewReceipt($session, 1, $rid); + } + + break; + case 4 : + if ($gstart == OVERTIME) { + setNewGameReset($session, $rid); + setNewTurnReset($session, $rid); + roomRrecruit($session, $rid, 2); + clsRoomTurnCount($session,$rid); + setAIchar($session, $rid); + + setNewReceipt($session, 0, $rid); + } + break; + + default: + + } + + } + } + + + } catch(PDOException $e){ + throw new Exception('50000', SYSTEM_ERROR); + } catch (Exception $e){ + throw new Exception('00002', SYSTEM_ERROR); + } + + function checkUser($session, $rid) { + + $sql = "select battleID from t_battle where roomID = :roomID and charKbn = '" . USER_KBN ."'"; + $pa = array(":roomID" => $rid); + $result = $session->query_update($sql, $pa); + + return empty($result); + + } + + function changeStatus($session, $status, $rid) { + + $sql = "update t_turnTimer set timerStatus = :status where roomID = :roomID"; + $pa = array(":status" => $status, ":roomID" => $rid); + + $result = $session->query_update($sql, $pa); + + if ($result == 0) { + throw new Exception('0090001', SYSTEM_ERROR); + } + + } + + function setNewReceipt($session, $status, $rid) { + + $sql = "update t_turnTimer set receiptTime = now(), timerStatus = :status where roomID = :roomID"; + $pa = array(":status" => $status, ":roomID" => $rid); + + $result = $session->query_update($sql, $pa); + + if ($result == 0) { + throw new Exception('0090002', SYSTEM_ERROR); + } + + } + + function setNewTurnReset($session, $rid) { + + $sql = "delete from t_userAction where roomID = :roomID"; + $pa = array(":roomID" => "$rid"); + + $result = $session->query_update($sql, $pa); + + } + + function setNewGameReset($session, $rid) { + + $sql = "delete from t_battle where roomID = :roomID"; + $pa = array(":roomID" => "$rid" ); + + $result = $session->query_update($sql, $pa); + + } + + function roomRrecruit($session, $rid, $recruit) { + + $sql = 'update t_room set roomStatus = :roomStatus, lastUpdateDate = now() where roomID = :roomID'; + $pa = array( ":roomStatus" => $recruit, ":roomID" => $rid); + $result_uid = $session->query_select($sql, $pa); + + } + + function addRoomTurnCount($session, $rid) { + + $sql = 'update t_room set turnCount = turnCount + 1, lastUpdateDate = now() where roomID = :roomID'; + $pa = array(":roomID" => $rid); + $result_uid = $session->query_select($sql, $pa); + + } + + function clsRoomTurnCount($session, $rid) { + + $sql = 'update t_room set turnCount = 0, lastUpdateDate = now() where roomID = :roomID'; + $pa = array(":roomID" => $rid); + $result_uid = $session->query_select($sql, $pa); + + } + + function battlecalculate($session, $rid) { + + $gameOver = false; + + $sql = 'select userID, roomID, moveMapChipNo, battleCommandID, battleMapChipNo from t_userAction where roomId = :roomID'; + $pa = array(":roomID" => $rid); + $result = $session->query_select($sql, $pa); + + if (! empty($result)) { + foreach($result as $row) { + if (! empty($row['battleMapChipNo'])) { + $sql = 'update t_battle set power=power - :dp where mapChipNo = :bMapchip and roomID = :roomID'; + $pa = array( ":dp" => DEC_POWER, ":bMapchip" => $row['battleMapChipNo'], ":roomID" => $rid); + + $result_uid = $session->query_select($sql, $pa); + } + } + + foreach($result as $row) { + if (! empty($row['moveMapChipNo'])) { + $sql = 'update t_battle set mapChipNo = :mapChipNo where userID = :userID and roomID = :roomID'; + $pa = array( ":mapChipNo" => $row['moveMapChipNo'], ":userID" => $row['userID'], ":roomID" => $rid); + $result_uid = $session->query_select($sql, $pa); + } + } + + //çµäºç¢ºèª(å ¨é¨ãunionçµåãã¦å¤å®ã¯ä¸åã§ããããããª) + + // ç·å¤§å°ãããã + $sql = 'select battleID from t_battle where charKbn = :soudaisyo and roomID = :roomID and power = 0'; + $pa = array( ":soudaisyo" => SOUDAISYO_KBN, ":roomID" => $rid); + + $result = $session->query_select($sql, $pa); + if (! empty($result)) { + $gameOver = true; + } + + //å µå0 + $sql = 'select power_a from (select countryID, sum(power) as power_a from t_battle where roomID = :roomID group by countryID) a where power_a = 0'; + $pa = array(":roomID" => $rid); + + $result = $session->query_select($sql, $pa); + if (! empty($result)) { + $gameOver = true; + } + } + + // ã«ã¼ã ãã¼ãã«ã®ã«ã¦ã³ã¿ã¼å¤ + $sql = 'select roomID from t_room where roomID = :roomID and maxTurnCount < turnCount'; + $pa = array(":roomID" => $rid); + + $result = $session->query_select($sql, $pa); + if (! empty($result)) { + $gameOver = true; + } + + return $gameOver; + + } + + + function setAiChar($session, $rid) { + + + $sql = 'select offenseCountry, defenseCountry from t_room where roomID = :roomID'; + $pa = array(":roomID" => $rid); + + $result = $session->query_select($sql, $pa); + foreach($result as $row) { + setAiBattle($session, $row['offenseCountry'], OFF_TYPE, $rid); + setAiBattle($session, $row['defenseCountry'], DEF_TYPE, $rid); + } + } + + + function setAiBattle($session, $countryID, $type, $rid){ + + $sql = 'select a.charID, a.charName, a.countryID, a.charType, d.power, d.mobility from t_defaultParam d, t_AICharacter a where a.countryID = :countryID and a.paramID = d.paramID'; + $pa = array(":countryID" => $countryID); + + $result = $session->query_select($sql, $pa); + $randkey = range(0, count($result) - 1); + shuffle($randkey); + + $numOfChars = min(array(3, count($result))); + + $ctype = false; + $cnt = 0; + for ($c = 0; $c < $numOfChars; $c++ ) { + $row = $result[$randkey[$c]]; + $cnt++; + + if ($row['charType'] == SOUDAISYO_KBN) { + $ctype = true; + } + + if ($cnt == $numOfChars and $ctype == false) { + $row['charType'] = SOUDAISYO_KBN; + } + + $umapNo = getUserMapNo($type); + + // ä¹±æ°ãªã®ã§åãå¤ã«ãªããªããã¨ãåæâå¾ã§ç´ã + $bid = makeBattleID(); + + $sql = "insert into t_battle values (:bid, :rid, :uid, :userName, :countryID, :userKbn, :umapNo, :power, :mobility, :exclusionKbn, now())"; + $pa = array( + ":bid" => "$bid", + ":rid" => "$rid", + ":uid" => $row['charID'], + ":userName" => $row['charName'], + ":countryID" => $row['countryID'], + ":userKbn" => $row['charType'], + ":umapNo" => "$umapNo", + ":power" => $row['power'], + ":mobility" => $row['mobility'], + ":exclusionKbn" => "0"); + + $result_inc = $session->query_update($sql, $pa); + + if ($result_inc == 0) { + throw new Exception('0080003', SYSTEM_ERROR); + } + } + } + + function makeBattleID() { + + $bid = 0; + + for ($i = 0 ; $i < 8 ; $i++){ + $bid = $bid . mt_rand(0, 9); + } + + return $bid; + + } + + function getUserMapNo($utype) { + + $initMap = ($utype == OFF_TYPE) ? unserialize(OFF_INIT) : unserialize(DEF_INIT); + return $initMap[mt_rand(0, count($initMap))]; + } + + Added: tags/Ver.0.1.5/Server/ä¸å½å¿ãµã¼ãã¤ã³ã¹ãã¼ã«æé _CentOS5_32.txt =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/Server/ä¸å½å¿ãµã¼ãã¤ã³ã¹ãã¼ã«æé _CentOS5_32.txt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: tags/Ver.0.1.5/Server/ä¸å½å¿ãµã¼ãã¤ã³ã¹ãã¼ã«æé _CentOS5_64.txt =================================================================== (Binary files differ) Property changes on: tags/Ver.0.1.5/Server/ä¸å½å¿ãµã¼ãã¤ã³ã¹ãã¼ã«æé _CentOS5_64.txt ___________________________________________________________________ Added: svn:mime-type + application/octet-stream