Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

some fixes

  • Loading branch information...
commit 4172c67c2721fca500a332d7d39e3fd1e469e65e 1 parent 54c8325
@kpj authored
View
5 Data_packet.java
@@ -16,8 +16,6 @@
boolean on_the_fly = true;
- ArrayList<Char> ini_t = null;
-
@SuppressWarnings("unchecked")
public Data_packet(ArrayList<ArrayList> f, boolean turn, int w, int h, String p2b, int n)
{
@@ -29,11 +27,10 @@ public Data_packet(ArrayList<ArrayList> f, boolean turn, int w, int h, String p2
num = n;
}
@SuppressWarnings("unchecked")
- public Data_packet(HashMap<Integer, Place> c, boolean turn, int n, ArrayList<Char> it)
+ public Data_packet(HashMap<Integer, Place> c, boolean turn, int n)
{
changes = (HashMap<Integer, Place>)c.clone();
my_turn = turn;
num = n;
- ini_t = it;
}
}
View
2  data/fights/test.txt
@@ -10,7 +10,7 @@ G:Elitewache:pics/Character/Basis1.png,pics/Character/Gesicht/Augen2.png,pics/Ch
R:Rick:pics/Character/Basis2.png,pics/Character/Gesicht/Augen2.png,pics/Character/Gesicht/Nase1.png,pics/Character/Gesicht/Braue1.png,pics/Character/Gesicht/Mund1.png,pics/Character/Gesicht/Frisur2.png:1:
#
N:NON-WALKABLE:undef:-1:
-backgroundimg:pics/Background.png:
+backgroundimg:pics/gras_dirty.png:
#
Item:Bogenschuetze:4e:6e:15e:
Item:Koenig:22e:3e:6e:14e:19e:20e:
View
15 fight_handler.java
@@ -411,7 +411,7 @@ public void move_char(Place from, Place to, boolean human) {
return;
}*/
if (from.cur != content.ini_table.get(0)) {
- content.notification.add_noti("It is not this characters turn");
+ content.notification.add_noti("It is not this characters' turn");
return;
}
} else {
@@ -1175,10 +1175,16 @@ public void mousewheel_used (int amount) {
public void turn_to_next_char() {
content.ini_table.add(content.ini_table.get(0));
content.ini_table.remove(0);
+
+ if(content.ini_table.get(0).team == team) {
+ content.my_turn = true;
+ } else {
+ content.my_turn = false;
+ }
}
public synchronized void update_on_the_fly() {
- Data_packet p = new Data_packet(changes, my_tmp_turn, client.num, content.ini_table);
+ Data_packet p = new Data_packet(changes, my_tmp_turn, client.num);
p.on_the_fly = !new_round_sending;
if (new_round_sending) {
@@ -1216,8 +1222,6 @@ public Data_getter(fight_handler par, content_handler con) {
public void run() {
while (true) {
Data_packet cur = parent.client.get_existing_data();
-
- content.ini_table = cur.ini_t;
if (!cur.on_the_fly) {
//A new round started
@@ -1227,8 +1231,7 @@ public void run() {
parent.apply_changes(cur.changes);
parent.make_chars_ready();
- content.my_turn = cur.my_turn;
- my_tmp_turn = content.my_turn;
+ turn_to_next_char();
content.notification.add_noti((content.my_turn)?"It is your turn":"Wait for other players");
}
View
2  menu_handler.java
@@ -40,7 +40,7 @@ public void draw_stuff(Graphics g3, draw_anything imo) {
g.fillRect(x, y, content.window_width, menu_height + menu_height_changer);
g.setColor(Color.black);
- g.drawString((content.my_turn)?"Press \"n\" for next round!":"Wait for other players", x2 - 200, y + 15);
+ g.drawString((content.my_turn)?"Press \"n\" for next character!":"Wait for other players", x2 - 200, y + 15);
if (content.current_selected == null) {
g.drawString("No character selected.", x + 5, y + 15);
View
BIN  misc/compiler_saves
Binary file not shown
View
20 package.bluej
@@ -8,6 +8,12 @@ dependency10.type=UsesDependency
dependency100.from=applet_handler
dependency100.to=Image_parser
dependency100.type=UsesDependency
+dependency101.from=Client
+dependency101.to=Char
+dependency101.type=UsesDependency
+dependency102.from=Data_packet
+dependency102.to=Char
+dependency102.type=UsesDependency
dependency11.from=key_handler
dependency11.to=Char
dependency11.type=UsesDependency
@@ -303,7 +309,7 @@ package.editor.height=721
package.editor.width=641
package.editor.x=672
package.editor.y=19
-package.numDependencies=100
+package.numDependencies=102
package.numTargets=23
package.showExtends=true
package.showUses=true
@@ -312,13 +318,13 @@ readme.editor.height=700
readme.editor.width=900
readme.editor.x=0
readme.editor.y=0
-target1.editor.height=878
-target1.editor.width=670
-target1.editor.x=736
+target1.editor.height=879
+target1.editor.width=1088
+target1.editor.x=198
target1.editor.y=18
target1.height=30
target1.name=Data_packet
-target1.naviview.expanded=true
+target1.naviview.expanded=false
target1.showInterface=false
target1.type=ClassTarget
target1.width=60
@@ -542,8 +548,8 @@ target5.x=270
target5.y=220
target6.editor.height=879
target6.editor.width=718
-target6.editor.x=523
-target6.editor.y=47
+target6.editor.x=718
+target6.editor.y=17
target6.height=40
target6.name=Char
target6.naviview.expanded=false
Please sign in to comment.
Something went wrong with that request. Please try again.