Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Aryya Dwisatya W
IF3230-Tugas-Besar-Sister-2015
Commits
8c580162
Commit
8c580162
authored
Apr 27, 2015
by
adwisatya
Browse files
Handling map
parent
b769eb2a
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/server/build/built-jar.properties
View file @
8c580162
#Mon, 27 Apr 2015 00:
13:24
+0700
#Mon, 27 Apr 2015 00:
52:16
+0700
C\:\\Users\\adwisatya\\Documents\\Semester\
6\\Tugas\\IF3230\
Sister\\IF3230-Tugas-Besar-Sister-2015\\src\\
server
=
src/server/build/classes/folder/map.json
deleted
100644 → 0
View file @
b769eb2a
{
"name"
:
"Bandar Behari"
,
"width"
:
4
,
"height"
:
4
,
"map"
:[[
"R13"
,
"R13"
,
"R13"
,
"R13"
],[
"R13"
,
"R13"
,
"R14"
,
"R14"
],[
"R13"
,
"R14"
,
"R14"
,
"R14"
],[
"R13"
,
"R14"
,
"R14"
,
"R14"
]]}
src/server/build/classes/thealchemist/Client.class
View file @
8c580162
No preview for this file type
src/server/build/classes/thealchemist/map.json
deleted
100644 → 0
View file @
b769eb2a
{
"name"
:
"Bandar Behari"
,
"width"
:
4
,
"height"
:
4
,
"map"
:[[
"R13"
,
"R13"
,
"R13"
,
"R13"
],[
"R13"
,
"R13"
,
"R14"
,
"R14"
],[
"R13"
,
"R14"
,
"R14"
,
"R14"
],[
"R13"
,
"R14"
,
"R14"
,
"R14"
]]}
src/server/src/thealchemist/Client.java
View file @
8c580162
...
...
@@ -11,12 +11,16 @@ import java.io.File;
import
java.io.FileNotFoundException
;
import
java.io.FileReader
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.io.OutputStream
;
import
java.io.OutputStreamWriter
;
import
java.io.PrintStream
;
import
java.io.PrintWriter
;
import
java.net.*
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.security.MessageDigest
;
import
java.security.NoSuchAlgorithmException
;
import
java.sql.SQLException
;
...
...
@@ -27,6 +31,7 @@ import java.util.Arrays;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Enumeration
;
import
java.util.Scanner
;
import
java.util.TimeZone
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
...
...
@@ -71,6 +76,7 @@ public class Client extends Thread{
/* Testing database */
clientSentence
=
""
;
char
[]
buffer
=
new
char
[
MAX_BUFFER
];
loadMap
();
while
(
true
){
try
{
fromClient
=
new
BufferedReader
(
new
InputStreamReader
(
connectionSocket
.
getInputStream
()));
...
...
@@ -300,8 +306,8 @@ public class Client extends Thread{
}
/* Sukses */
public
void
cmdMap
(
String
token
)
throws
IOException
,
NoSuchAlgorithmException
,
JSONException
{
loadMap
();
String
response
=
""
;
JSONObject
obj
=
new
JSONObject
();
try
{
obj
=
database
.
getMap
();
...
...
@@ -551,13 +557,14 @@ public class Client extends Thread{
}
public
void
loadMap
(){
String
filename
=
"map.json"
;
File
f
=
new
File
(
"file.json"
);
if
(
f
.
exists
()){
System
.
out
.
println
(
"ada"
);
}
else
{
System
.
out
.
println
(
"tidak ada"
);
File
f
=
new
File
(
"map.json"
);
System
.
out
.
println
(
f
.
getPath
());
System
.
out
.
println
(
f
.
getAbsolutePath
());
try
{
System
.
out
.
println
(
f
.
getCanonicalPath
());
}
catch
(
Exception
e
)
{}
}
}
src/server/src/thealchemist/map.json
deleted
100644 → 0
View file @
b769eb2a
{
"name"
:
"Bandar Behari"
,
"width"
:
4
,
"height"
:
4
,
"map"
:[[
"R13"
,
"R13"
,
"R13"
,
"R13"
],[
"R13"
,
"R13"
,
"R14"
,
"R14"
],[
"R13"
,
"R14"
,
"R14"
,
"R14"
],[
"R13"
,
"R14"
,
"R14"
,
"R14"
]]}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment