Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tristan MAISONNEUVE
projetS2-2021-23-LJ
Commits
7c75d53b
Commit
7c75d53b
authored
Jun 22, 2021
by
Jolan RENOUX
Browse files
debut app
parent
4fbac6e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
.idea/misc.xml
View file @
7c75d53b
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1
5
"
project-jdk-name=
"1
5 (2)
"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1
4
"
project-jdk-name=
"1
4
"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/out"
/>
</component>
</project>
\ No newline at end of file
src/Application.java
View file @
7c75d53b
import
com.mashape.unirest.http.exceptions.UnirestException
;
import
info1.network.Network
;
import
info1.network.Player
;
import
vue.FenetreConnexion
;
import
java.awt.*
;
...
...
@@ -11,10 +14,19 @@ import java.awt.*;
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
FenetreConnexion
test
=
new
FenetreConnexion
(
"Connexion au serveur et aux parties"
,
"http://37.187.38.219/api/v0"
);
// http://172.26.82.18/api/v0 (URL à changer si ca ne marche pas)
// http://172.26.82.18/
/
api/v0 (URL à changer si ca ne marche pas)
test
.
setPreferredSize
(
new
Dimension
(
800
,
400
));
test
.
pack
();
test
.
setVisible
(
true
);
Player
jaquie
=
new
Player
(
"Jaquie"
);
try
{
Network
.
suscribeNewPlayer
(
"http://172.26.82.18//api/v0"
,
jaquie
);
}
catch
(
UnirestException
e
)
{
e
.
printStackTrace
();
}
}
}
test/RunningGameTest.java
View file @
7c75d53b
...
...
@@ -21,8 +21,8 @@ import static org.junit.jupiter.api.Assertions.*;
*/
public
class
RunningGameTest
{
public
static
final
String
HTTP_LOCALHOST
=
"http://
37.187.38.219
/api/v0"
;
//ancien url: http://37.187.38.219/api/v0
public
static
final
String
HTTP_LOCALHOST
=
"http://
172.26.82.18/
/api/v0"
;
static
Player
joueur1
;
static
Player
joueur2
;
...
...
Write
Preview
Markdown
is supported
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