Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
the_dungeon_project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
genie_logiciel_2015
the_dungeon_project
Commits
8aa6c9dc
Commit
8aa6c9dc
authored
Jan 09, 2016
by
Huot Mathieu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed when game leaves, play-term in makefile
parent
85a784cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
Makefile
Makefile
+1
-1
src/graphics/guiSkeleton/GraphicsMaster.java
src/graphics/guiSkeleton/GraphicsMaster.java
+0
-1
src/graphics/ingame_input_listener/InputConfiguration.java
src/graphics/ingame_input_listener/InputConfiguration.java
+6
-6
No files found.
Makefile
View file @
8aa6c9dc
...
@@ -103,4 +103,4 @@ play:
...
@@ -103,4 +103,4 @@ play:
cd
bin/
;
java
-cp
$(LIB)
*
:. graphics.guiSkeleton.Igniter_Main &
cd
bin/
;
java
-cp
$(LIB)
*
:. graphics.guiSkeleton.Igniter_Main &
play-term
:
play-term
:
cd
bin/
;
java
-cp
$(LIB)
*
:. graphics.termSkeleton.Igniter_Main_Term
&
cd
bin/
;
java
-cp
$(LIB)
*
:. graphics.termSkeleton.Igniter_Main_Term
src/graphics/guiSkeleton/GraphicsMaster.java
View file @
8aa6c9dc
...
@@ -39,7 +39,6 @@ public class GraphicsMaster extends GraphicsMasterAbstraction {
...
@@ -39,7 +39,6 @@ public class GraphicsMaster extends GraphicsMasterAbstraction {
private
MainFrame
mainFrame
;
private
MainFrame
mainFrame
;
private
GraphicsMaster
()
{
private
GraphicsMaster
()
{
super
.
mainFrame
=
mainFrame
;
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
UNINITIALISED
,
new
UnitialisedGUIPanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
UNINITIALISED
,
new
UnitialisedGUIPanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
MAIN_MENU
,
new
MainMenuPanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
MAIN_MENU
,
new
MainMenuPanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
GAME_PANEL
,
new
GamePanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
GAME_PANEL
,
new
GamePanel
(
this
));
...
...
src/graphics/ingame_input_listener/InputConfiguration.java
View file @
8aa6c9dc
package
graphics.ingame_input_listener
;
package
graphics.ingame_input_listener
;
import
logging.Logging
;
import
assets.UsedForLoadingSprites
;
import
assets.UsedForLoadingSprites
;
import
logging.Logging
;
import
java.awt.event.KeyEvent
;
import
java.awt.event.KeyEvent
;
import
java.io.*
;
import
java.io.BufferedReader
;
import
java.lang.reflect.Array
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.net.URL
;
import
java.net.URL
;
import
java.nio.charset.Charset
;
import
java.nio.charset.Charset
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.file.Files
;
import
java.nio.file.Files
;
import
java.nio.file.Paths
;
import
java.nio.file.Paths
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
...
@@ -103,13 +103,12 @@ public class InputConfiguration {
...
@@ -103,13 +103,12 @@ public class InputConfiguration {
*/
*/
public
static
void
UpdateConfigurationWhenGameLeaves
(){
public
static
void
UpdateConfigurationWhenGameLeaves
(){
//List<String> configurationText=new ArrayList<>();
int
numberOfInput
=
9
;
int
numberOfInput
=
9
;
int
LineToWrite
=
0
;
int
LineToWrite
=
0
;
//2*numberOfInput because there are terminal and graphical versions
//2*numberOfInput because there are terminal and graphical versions
String
[]
configurationText
=
new
String
[
2
*
numberOfInput
];
String
[]
configurationText
=
new
String
[
2
*
numberOfInput
];
Charset
utf8
=
StandardCharsets
.
UTF_8
;
Charset
utf8
=
StandardCharsets
.
UTF_8
;
//Updating Configuration text w.r.t current inputs before leaving the game
//Updating Configuration text w.r.t current inputs before leaving the game
//First graphical version inputs
//First graphical version inputs
configurationText
[
LineToWrite
]=
GetFormalInputString
(
Input
.
UP_ARROW
);
configurationText
[
LineToWrite
]=
GetFormalInputString
(
Input
.
UP_ARROW
);
...
@@ -148,6 +147,7 @@ public class InputConfiguration {
...
@@ -148,6 +147,7 @@ public class InputConfiguration {
configurationText
[
LineToWrite
]=
String
.
valueOf
(
Character
.
toChars
(
ability3_terminal
));
configurationText
[
LineToWrite
]=
String
.
valueOf
(
Character
.
toChars
(
ability3_terminal
));
LineToWrite
++;
LineToWrite
++;
configurationText
[
LineToWrite
]=
String
.
valueOf
(
Character
.
toChars
(
escape_terminal
));
configurationText
[
LineToWrite
]=
String
.
valueOf
(
Character
.
toChars
(
escape_terminal
));
//Finally converting the array configurationText to a big string which is to replace configuration.txt
//Finally converting the array configurationText to a big string which is to replace configuration.txt
List
<
String
>
lines
=
Arrays
.
asList
(
configurationText
);
List
<
String
>
lines
=
Arrays
.
asList
(
configurationText
);
try
{
try
{
...
...
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